結果

問題 No.893 お客様を誘導せよ
ユーザー lemonlemon
提出日時 2021-05-12 14:27:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 523 bytes
コンパイル時間 742 ms
コンパイル使用メモリ 11,696 KB
実行使用メモリ 16,472 KB
最終ジャッジ日時 2023-10-24 03:51:43
合計ジャッジ時間 2,115 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,024 KB
testcase_01 AC 33 ms
10,024 KB
testcase_02 AC 44 ms
10,944 KB
testcase_03 AC 83 ms
13,012 KB
testcase_04 AC 82 ms
13,008 KB
testcase_05 AC 77 ms
12,884 KB
testcase_06 AC 61 ms
12,012 KB
testcase_07 AC 31 ms
10,024 KB
testcase_08 AC 136 ms
16,472 KB
testcase_09 AC 34 ms
10,240 KB
testcase_10 AC 31 ms
10,028 KB
testcase_11 AC 42 ms
10,044 KB
testcase_12 AC 44 ms
10,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, collections
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
ntp = lambda: tuple(map(int, stdin.readline().split()))
mod = 10 * 9 + 7
inf = 2 << 60

n = ni()
A = [''] * n
P = []
Ans = []
for i in range(n):
    a = na()
    P.append(a[0])
    if a[0] != 0:
        A[i] = a[1:][::-1]

for _ in range(max(P)):
    for j in range(n):
        if A[j]:
            Ans.append(A[j].pop())

print(*Ans)
0