結果

問題 No.893 お客様を誘導せよ
ユーザー kang36102741kang36102741
提出日時 2019-09-27 23:02:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 299 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 11,856 KB
実行使用メモリ 15,056 KB
最終ジャッジ日時 2023-10-25 05:44:40
合計ジャッジ時間 5,581 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 28 ms
10,044 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 TLE -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
r = [[int(i) for i in input().split()] for j in range(n)]
k = 0
ans = []
while not all(r[i][0] == 0 for i in range(n)):
    if r[k][0] != 0:
        ans += [r[k].pop(1)]
        r[k][0] -= 1
    k = (k+1)%n
    # print(all(r[i][0] == 0 for i in range(n)))
for i in ans:
    print(i)
0