結果

問題 No.893 お客様を誘導せよ
ユーザー na-sh
提出日時 2019-10-10 09:05:47
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,120 KB
最終ジャッジ日時 2024-11-20 14:40:58
合計ジャッジ時間 2,006 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

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