結果

問題 No.893 お客様を誘導せよ
ユーザー DrDrpilotDrDrpilot
提出日時 2022-04-10 18:32:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 14,736 KB
最終ジャッジ日時 2023-08-21 00:17:41
合計ジャッジ時間 1,834 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,804 KB
testcase_01 AC 16 ms
7,868 KB
testcase_02 AC 30 ms
9,092 KB
testcase_03 AC 64 ms
11,264 KB
testcase_04 AC 62 ms
11,380 KB
testcase_05 AC 58 ms
10,876 KB
testcase_06 AC 44 ms
10,224 KB
testcase_07 AC 14 ms
7,928 KB
testcase_08 AC 113 ms
14,736 KB
testcase_09 AC 18 ms
8,216 KB
testcase_10 AC 15 ms
7,800 KB
testcase_11 AC 17 ms
7,800 KB
testcase_12 AC 18 ms
8,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
line=[]
for _ in range(n):
    p=list(map(int,input().split()))
    if p[0]==0:
        continue
    a=p[1:][::-1]
    line.append(a)
ans=[]

while line:
    next_line=[]
    for i in line:
        tmp=i.pop()
        ans.append(tmp)
        if len(i)!=0:
            next_line.append(i)
    line=next_line
print(*ans)
0