結果

問題 No.893 お客様を誘導せよ
ユーザー masumasumath1masumasumath1
提出日時 2020-01-03 00:18:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 161 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 10,836 KB
実行使用メモリ 12,276 KB
最終ジャッジ日時 2023-08-14 18:57:56
合計ジャッジ時間 2,833 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,084 KB
testcase_01 AC 14 ms
8,200 KB
testcase_02 AC 36 ms
8,824 KB
testcase_03 AC 93 ms
10,220 KB
testcase_04 AC 91 ms
10,204 KB
testcase_05 AC 87 ms
10,184 KB
testcase_06 AC 63 ms
9,576 KB
testcase_07 AC 15 ms
8,152 KB
testcase_08 AC 161 ms
12,276 KB
testcase_09 AC 19 ms
8,328 KB
testcase_10 AC 15 ms
8,212 KB
testcase_11 AC 35 ms
8,364 KB
testcase_12 AC 37 ms
8,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
P = [0 for _ in range(N)]
A = [[] for _ in range(N)]
cnt = 0
for i in range(N):
    P[i],*A[i] = map(int,input().split())
    cnt += P[i]
i = 0
j = 0
while 1:
    if P[i%N] > 0:
        print(A[i%N].pop(0),end=" ")
        j += 1
        P[i%N] -=1
        if j == cnt:
            exit()
    i += 1
0