Cerinta completa There are n users registered on a website CuteKittens.com. Each of them has a unique password represented by pass[1], pass[2], …, pass[N]. As this a very lovely site, many people want to access those awesomely cute pics of
Oil Well
Cerinta completa Mr. Road Runner bought a piece of land in the middle of a desert for a nominal amount. It turns out that the piece of land is now worth millions of dollars as it has an oil reserve
New Year Game
Cerinta completa It’s New Year’s Day, and Balsa and Koca are stuck inside watching the rain. They decide to invent a game, the rules for which are described below. Given array containing integers, they take turns making a single move.
Minimum MST Graph
Cerinta completa Allison loves graph theory and just started learning about Minimum Spanning Trees(MST). She has three integers, , , and , and uses them to construct a graph with the following properties: The graph has nodes and undirected edges
Maximizing the Function
Cerinta completa Consider an array of binary integers (i.e., ‘s and ‘s) defined as . Let be the bitwise XOR of all elements in the inclusive range between index and index in array . In other words, . Next, we’ll
Maximizing Mission Points
Cerinta completa Xander Cage has a list of cities he can visit on his new top-secret mission. He represents each city as a tuple of . The values of , , and are distinct across all cities. We define a
Manipulative Numbers
Cerinta completa Suppose that is a list of numbers and is a permutation of these numbers, we say B is K-Manipulative if and only if: is not less than , where represents the XOR operator. You are given . Find
Lena Sort
Cerinta completa Lena developed a sorting algorithm described by the following pseudocode: lena_sort(array nums) { if (nums.size <= 1) { return nums; } pivot = nums[0]; array less; array more; for (i = 1; i < nums.size; ++i) { //
KnightL on a Chessboard
Cerinta completa is a chess piece that moves in an L shape. We define the possible moves of as any movement from some position to some satisfying either of the following: and , or and Note that and allow for
King Richard’s Knights
Cerinta completa King Richard is leading a troop of knights into battle! Being very organized, he labels his knights and arranges them in an square formation, demonstrated below: Before the battle begins, he wants to test how well his knights
