結果

問題 No.893 お客様を誘導せよ
ユーザー nohakai3nohakai3
提出日時 2022-07-24 18:57:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,764 KB
実行使用メモリ 14,648 KB
最終ジャッジ日時 2023-09-20 18:53:58
合計ジャッジ時間 1,560 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,944 KB
testcase_01 AC 15 ms
7,884 KB
testcase_02 AC 29 ms
9,160 KB
testcase_03 AC 64 ms
11,284 KB
testcase_04 AC 62 ms
11,272 KB
testcase_05 AC 59 ms
10,864 KB
testcase_06 AC 46 ms
10,364 KB
testcase_07 AC 15 ms
7,844 KB
testcase_08 AC 119 ms
14,648 KB
testcase_09 AC 19 ms
8,368 KB
testcase_10 AC 16 ms
7,888 KB
testcase_11 AC 18 ms
7,848 KB
testcase_12 AC 19 ms
8,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
line=[]
for i in range(n):
    p=list(map(int,input().split()))
    if p[0]==0:
        continue
    
    a=p[1:][::-1]
    line.append(a)
ans=[]
while line:
    ne=[]
    for x in line:
        tmp=x.pop()
        ans.append(tmp)
        if len(x)!=0:
            ne.append(x)
    line=ne
print(*ans)
0