Fighting Pits

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:

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

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