結果

問題 No.893 お客様を誘導せよ
ユーザー liny_tailliny_tail
提出日時 2023-01-03 17:21:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 640 ms
コンパイル使用メモリ 10,580 KB
実行使用メモリ 16,744 KB
最終ジャッジ日時 2023-08-18 00:42:01
合計ジャッジ時間 2,466 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,852 KB
testcase_01 AC 15 ms
7,904 KB
testcase_02 AC 26 ms
9,176 KB
testcase_03 AC 59 ms
12,100 KB
testcase_04 AC 57 ms
12,192 KB
testcase_05 AC 51 ms
11,896 KB
testcase_06 AC 41 ms
10,696 KB
testcase_07 AC 16 ms
7,828 KB
testcase_08 AC 91 ms
16,744 KB
testcase_09 AC 19 ms
8,308 KB
testcase_10 AC 16 ms
7,800 KB
testcase_11 AC 33 ms
7,796 KB
testcase_12 AC 35 ms
8,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input().strip())
P = []
for i in range(N):
  PA = [i for i in input().strip().split(' ')]
  A = PA[1:]
  P.append(A)

cnt = -1
ans = []

while cnt != 0:
  cnt = 0
  for i in range(N):
    if len(P[i]) > 0:
      ans.append(P[i].pop(0))
      cnt += 1

ans = ' '.join(ans)
print(ans)
0