結果

問題 No.893 お客様を誘導せよ
ユーザー caleicalei
提出日時 2020-01-19 16:34:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 473 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 14,932 KB
最終ジャッジ日時 2023-09-15 20:10:18
合計ジャッジ時間 2,299 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,628 KB
testcase_01 AC 17 ms
8,632 KB
testcase_02 AC 29 ms
9,328 KB
testcase_03 AC 62 ms
11,420 KB
testcase_04 AC 64 ms
11,472 KB
testcase_05 AC 58 ms
11,440 KB
testcase_06 AC 46 ms
10,528 KB
testcase_07 AC 18 ms
8,528 KB
testcase_08 AC 110 ms
14,932 KB
testcase_09 AC 21 ms
8,768 KB
testcase_10 AC 18 ms
8,524 KB
testcase_11 AC 20 ms
8,452 KB
testcase_12 AC 21 ms
8,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 2020/01/19

from collections import deque

n=int(input())
pa=deque()

for _ in range(n):
    _,*a=map(int,input().split())
    if a:
        pa.append(a[::-1])

ans=[]
while pa:
    a=pa.popleft()
    ans.append(a.pop())
    if a:
        pa.append(a)
print(*ans)
0