結果

問題 No.893 お客様を誘導せよ
ユーザー na-shna-sh
提出日時 2019-10-10 09:05:47
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 638 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 20,624 KB
最終ジャッジ日時 2023-08-12 22:23:59
合計ジャッジ時間 2,673 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,756 KB
testcase_01 AC 15 ms
7,872 KB
testcase_02 AC 26 ms
9,668 KB
testcase_03 AC 60 ms
13,808 KB
testcase_04 AC 61 ms
13,880 KB
testcase_05 AC 58 ms
13,308 KB
testcase_06 AC 43 ms
11,736 KB
testcase_07 AC 15 ms
7,872 KB
testcase_08 AC 115 ms
20,624 KB
testcase_09 AC 19 ms
8,164 KB
testcase_10 AC 16 ms
7,908 KB
testcase_11 AC 18 ms
7,856 KB
testcase_12 AC 19 ms
8,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

As = []
for _ in range(N):
    PA = list(map(int, input().split()))
    P = PA.pop(0)
    if PA:
        As.append(PA)

result = []
while As:
    A = As.pop(0)
    a = A.pop(0)
    result.append(a)
    if A:
        As.append(A)

print(' '.join(str(a) for a in result))
0