Problem C
Train Journey
Languages
en
ja
sv
A group of people are going to travel by train and are
thinking about where they are going to sit. A group of people
are going to travel by train and are thinking about how to sit.
Each pair of friends that sit in seats with Euclidean
distance
Input
The input consists of
The first line contains the number
Output
Print
Scoring
Your program will be tested with
Your score for a submission is the sum of the points for the test cases.
Your score is computed relative to a judge’s solution. If
your solution is better than the one the judges threw together,
it is possible that you will get more than
The sample test case always gives
Explanation of sample test case
In the sample test case we want to place
A better solution can be found so that all pairs of friends
are at a distance of
Test cases
The graph of friendships is called
Test case |
Bounds |
Description of test case |
|
|
All edges in |
|
|
All edges in |
|
|
All edges in |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All edges in |
|
|
All edges in |
Here "random" means uniformly random.
Sample Input 1 | Sample Output 1 |
---|---|
0 2 5 5 7 8 7 1 2 2 3 1 4 |
6 5 7 8 1 2 3 4 |