Time Limit: 2 sec / Memory Limit: 1024 MB
(相关资料图)
Score : 100100 points
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.
5alice 31bob 41carol 5dave 92ellen 65
caroldaveellenalicebob
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.
2takahashi 1000000000aoki 999999999
aokitakahashi
下面是代码:
标签: