結果

問題 No.893 お客様を誘導せよ
ユーザー ohanaohana
提出日時 2023-10-30 10:57:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 81,840 KB
実行使用メモリ 86,508 KB
最終ジャッジ日時 2023-10-30 10:57:44
合計ジャッジ時間 2,725 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,580 KB
testcase_01 AC 36 ms
53,580 KB
testcase_02 AC 63 ms
70,784 KB
testcase_03 AC 84 ms
80,164 KB
testcase_04 AC 80 ms
80,156 KB
testcase_05 AC 79 ms
79,648 KB
testcase_06 AC 71 ms
78,136 KB
testcase_07 AC 37 ms
53,580 KB
testcase_08 AC 94 ms
86,508 KB
testcase_09 AC 55 ms
65,972 KB
testcase_10 AC 37 ms
53,580 KB
testcase_11 AC 52 ms
64,020 KB
testcase_12 AC 60 ms
68,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

A = [list(map(int, input().split()[1:][::-1])) for i in range(n)]
B = []

cnt = sum([len(a) for a in A])
i = -1
while cnt > 0:
    i += 1
    if not A[i % n]:
        continue
    B.append(A[i % n].pop())
    cnt -= 1

print(*B)
0