結果

問題 No.893 お客様を誘導せよ
ユーザー convexineqconvexineq
提出日時 2021-04-03 14:57:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 160 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 89,588 KB
最終ジャッジ日時 2023-08-26 05:46:20
合計ジャッジ時間 3,754 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
71,468 KB
testcase_01 AC 95 ms
71,380 KB
testcase_02 AC 121 ms
77,796 KB
testcase_03 AC 142 ms
82,696 KB
testcase_04 AC 146 ms
82,580 KB
testcase_05 AC 141 ms
82,040 KB
testcase_06 AC 133 ms
79,640 KB
testcase_07 AC 99 ms
71,592 KB
testcase_08 AC 160 ms
89,588 KB
testcase_09 AC 118 ms
77,008 KB
testcase_10 AC 100 ms
71,636 KB
testcase_11 AC 118 ms
77,472 KB
testcase_12 AC 121 ms
77,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
n = int(input())
q = deque()
for _ in range(n):
    p, *a = map(int,input().split())
    q.append(a[::-1])
ans = []
while q:
    v = q.popleft()
    if v:
        ans.append(v.pop())
        if v: q.append(v)
print(*ans)
0