Cerinta completa An XOR operation on a list is defined here as the xor () of all its elements (e.g.: ). The of set is defined here as the sum of the s of all non-empty subsets of known as
XOR Subsequences
Cerinta completa Consider an array, , of integers (). We take all consecutive subsequences of integers from the array that satisfy the following: For example, if our subsequences will be: For each subsequence, we apply the bitwise XOR () operation
Winning Lottery Ticket
Cerinta completa The SuperBowl Lottery is about to commence, and there are several lottery tickets being sold, and each ticket is identified with a ticket ID. In one of the many winning scenarios in the Superbowl lottery, a winning pair
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 Story of a Tree
Cerinta completa One day Bob drew a tree, , with nodes and edges on a piece of paper. He soon discovered that parent of a node depends on the root of the tree. The following images shows an example of
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
