最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

ATCoder A - First Player

2023-06-04 14:58 作者:您是打尖兒還是住店呢  | 我要投稿

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

下面是代碼:


ATCoder A - First Player的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
米泉市| 宁远县| 大邑县| 巢湖市| 平泉县| 渑池县| 永登县| 兰州市| 河西区| 霍林郭勒市| 鹤山市| 罗定市| 且末县| 山东省| 鄂尔多斯市| 黄石市| 荣昌县| 池州市| 遂宁市| 仲巴县| 广德县| 施甸县| 琼海市| 河南省| 晋中市| 信阳市| 澄迈县| 荥阳市| 县级市| 汉川市| 介休市| 潢川县| 怀集县| 南溪县| 宣威市| 城步| 麻栗坡县| 孝义市| 玛沁县| 文昌市| 临桂县|