What’s Next?

Cerinta completa Johnny is playing with a large binary number, . The number is so large that it needs to be compressed into an array of integers, , where the values in even indices () represent some number of consecutive

Two Subarrays

Cerinta completa Consider an array, , of integers. We define the following terms: Subsequence A subsequence of is an array that’s derived by removing zero or more elements from without changing the order of the remaining elements. Note that a

Tree Splitting

Cerinta completa Given a tree with vertices numbered from to . You need to process queries. Each query represents a vertex number encoded in the following way: Queries are encoded in the following way: Let, be the query and be

Training the army

Cerinta completa In the magical kingdom of Kasukabe, people strive to possess skillsets. Higher the number of skillset present among the people, the more content people will be. There are types of skill set present and initially there exists people

Toll Cost Digits

Cerinta completa The mayor of Farzville is studying the city’s road system to find ways of improving its traffic conditions. Farzville’s road system consists of junctions connected by bidirectional toll roads, where the toll road connects junctions and . In

The Great XOR

Cerinta completa Given a long integer , count the number of values of satisfying the following conditions: where and are long integers and is the bitwise XOR operator. You are given queries, and each query is in the form of

Summing Pieces

Cerinta completa Consider an array, , of length . We can split into contiguous segments called pieces and store them as another array, . For example, if , we have the following arrays of pieces: contains three -element pieces. contains