結果

問題 No.893 お客様を誘導せよ
ユーザー ohara_nohara_n
提出日時 2020-03-20 20:49:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 331 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 14,672 KB
最終ジャッジ日時 2023-08-21 11:31:22
合計ジャッジ時間 1,930 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,800 KB
testcase_01 AC 14 ms
7,768 KB
testcase_02 AC 28 ms
9,212 KB
testcase_03 AC 65 ms
11,200 KB
testcase_04 AC 64 ms
11,068 KB
testcase_05 AC 60 ms
11,060 KB
testcase_06 AC 46 ms
10,188 KB
testcase_07 AC 15 ms
7,796 KB
testcase_08 AC 113 ms
14,672 KB
testcase_09 AC 19 ms
8,188 KB
testcase_10 AC 15 ms
7,932 KB
testcase_11 AC 25 ms
7,752 KB
testcase_12 AC 26 ms
8,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
Lines = []
length = 0
for _ in range(n):
    line = list(map(int,input().split()))
    Lines.append(line)
    length += len(line)-1

order = []
while len(order) < length:
    for line in Lines:
        if line[0] > 0:
            order.append(line[1])
            line[0] -= 1
            line.pop(1)
print(*order)
0