ATCoder A - First Player
Time Limit: 2 sec / Memory Limit: 1024 MB
Score :?100100?points
Problem Statement
There are?N?people numbered?1,2,…1,2,…,N, sitting in this clockwise order around a round table. In particular, person?11?is sitting next to person?N?in the clockwise direction.
For each?i=1,2,…,i=1,2,…,N, person?i?has a name?Si?and an age?Ai. Here, no two people have the same name or the same age.
Starting from the youngest person, print the names of all?N?people in the order of their seating positions in clockwise order.


Sample Input 1?Copy
5 alice 31 bob 41 carol 5 dave 92 ellen 65
Sample Output 1?Copy
carol dave ellen alice bob
The youngest person is person?33. Therefore, starting from person?33, print the names in the clockwise order of their seating positions: person?33, person?44, person?55, person?11, and person?22.
Sample Input 2
2 takahashi 1000000000 aoki 999999999
Sample Output 2?
aoki takahashi
下面是代碼: