結果

問題 No.893 お客様を誘導せよ
ユーザー dango
提出日時 2023-06-18 17:19:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 607 ms
コンパイル使用メモリ 82,496 KB
実行使用メモリ 86,432 KB
最終ジャッジ日時 2024-06-26 06:35:24
合計ジャッジ時間 2,452 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
queue = []
for i in range(N):
    k, *a = map(int, input().split())
    queue.append(a)

ans = []
while sum([len(q) for q in queue]) > 0:
    for i in range(N):
        if len(queue[i]) > 0:
            ans.append(queue[i].pop(0))

print(*ans)
0