結果

問題 No.893 お客様を誘導せよ
ユーザー roarisroaris
提出日時 2019-09-27 21:32:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 401 bytes
コンパイル時間 870 ms
コンパイル使用メモリ 81,732 KB
実行使用メモリ 88,752 KB
最終ジャッジ日時 2023-10-25 01:53:15
合計ジャッジ時間 1,859 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
53,524 KB
testcase_01 AC 42 ms
53,524 KB
testcase_02 AC 62 ms
72,972 KB
testcase_03 AC 83 ms
80,352 KB
testcase_04 AC 83 ms
80,432 KB
testcase_05 AC 88 ms
80,560 KB
testcase_06 AC 74 ms
78,940 KB
testcase_07 AC 42 ms
53,552 KB
testcase_08 AC 100 ms
88,752 KB
testcase_09 AC 56 ms
66,364 KB
testcase_10 AC 42 ms
55,600 KB
testcase_11 AC 51 ms
64,228 KB
testcase_12 AC 62 ms
68,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import deque

N = int(input())
ll = []

for _ in range(N):
    PA = list(map(int, input().split()))
    A = PA[1:]
    ll.append(deque(A))

ans = []

while True:
    flag = True
    
    for ll_i in ll:
        if len(ll_i) != 0:
            flag = False
            ans.append(ll_i.popleft())
            
    if flag:
        break

print(*ans)
0