結果

問題 No.893 お客様を誘導せよ
ユーザー buriburiburiburi
提出日時 2019-10-17 12:30:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 277 ms / 2,000 ms
コード長 440 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 15,216 KB
最終ジャッジ日時 2023-09-06 12:57:00
合計ジャッジ時間 3,043 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,404 KB
testcase_01 AC 19 ms
8,456 KB
testcase_02 AC 42 ms
9,564 KB
testcase_03 AC 199 ms
12,036 KB
testcase_04 AC 211 ms
11,960 KB
testcase_05 AC 175 ms
11,736 KB
testcase_06 AC 99 ms
10,696 KB
testcase_07 AC 18 ms
8,568 KB
testcase_08 AC 277 ms
15,216 KB
testcase_09 AC 176 ms
9,252 KB
testcase_10 AC 18 ms
8,588 KB
testcase_11 AC 179 ms
9,148 KB
testcase_12 AC 180 ms
9,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
registers = []
n = int(input())
for x in range(n):
    registers.append(deque([int(k) for k in input().split()[1:]]))

isEmpty = False

line = []
while registers:
    for re in registers:
        indices = []
        if not re:
            indices.append(registers.index(re))
            continue
        else:
            line.append(re.popleft())
    for i in indices:
        registers.pop(i)

print(*line)
0