Cerinta completa Meereen is famous for its fighting pits where fighters fight each other to the death. Initially, there are fighters and each fighter has a strength value. The fighters are divided into teams, and each fighter belongs exactly one
Encryption
Cerinta completa An English text needs to be encrypted using the following encryption scheme. First, the spaces are removed from the text. Let be the length of this text. Then, characters are written into a grid, whose rows and columns
Decibinary Numbers
Cerinta completa Let’s talk about binary numbers. We have an -digit binary number, , and we denote the digit at index (zero-indexed from right to left) to be . We can find the decimal value of using the following formula:
Coin on the Table
Cerinta completa You have a rectangular board consisting of rows, numbered from to , and columns, numbered from to . The top left is and the bottom right is . Initially – at time – there is a coin on
Circular Palindromes
Cerinta completa A palindrome is a string that reads the same from left to right as it does from right to left. Given a string, , of lowercase English letters, we define a -length rotation as cutting the first characters
White Falcon And Tree
Cerinta completa White Falcon has a tree with nodes. Each node contains a linear function. Let’s denote by the linear function contained in the node . Let’s denote the path from node to node like this: , where and ,
Truck Tour
Cerinta completa Suppose there is a circle. There are petrol pumps on that circle. Petrol pumps are numbered to (both inclusive). You have two pieces of information corresponding to each of the petrol pump: (1) the amount of petrol that
Tree: Level Order Traversal
Cerinta completa Given a pointer to the root of a binary tree, you need to print the level order traversal of this tree. In level-order traversal, nodes are visited level by level from left to right. Complete the function and
Triplets
Cerinta completa There is an integer array which does not contain more than two elements of the same value. How many distinct ascending triples () are present? Input format The first line contains an integer, , denoting the number of
Tree Coordinates
Cerinta completa We consider metric space to be a pair, , where is a set and such that the following conditions hold: where is the distance between points and . Let’s define the product of two metric spaces, , to
