B. Who's Opposite?
Some number of people (this number is even) have stood in a circle. The people stand in the circle evenly. They are numbered clockwise starting from a person with the number
You don't know the exact number of people standing in the circle (but this number is even, no doubt). It is known that the person with the number
The first line contains one integer
Each test case consists of one line containing three distinct integers
For each test case output in a separate line a single integer
7 6 2 4 2 3 1 2 4 10 5 3 4 1 3 2 2 5 4 4 3 2
8 -1 -1 -1 4 1 -1
In the first test case, there's a desired circle of
In the second test case, there's no circle meeting the conditions. If the person with the number
In the third test case, the only circle with the persons with the numbers
Post a Comment
0 Comments