結果

問題 No.893 お客様を誘導せよ
ユーザー 6soukiti296soukiti29
提出日時 2019-09-27 21:42:54
言語 Nim
(2.0.2)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 504 bytes
コンパイル時間 4,685 ms
コンパイル使用メモリ 65,852 KB
実行使用メモリ 6,520 KB
最終ジャッジ日時 2023-10-24 17:46:38
合計ジャッジ時間 4,756 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 5 ms
4,348 KB
testcase_03 AC 15 ms
4,852 KB
testcase_04 AC 14 ms
4,852 KB
testcase_05 AC 13 ms
4,824 KB
testcase_06 AC 9 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 28 ms
6,520 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sequtils,strutils
var
    N = stdin.readline.parseInt
    ans = newSeq[int](0)
    Ls = newSeqWith(N + 1, newSeq[int](0))
    cnt = 0

for n in 0..<N:
    var L = stdin.readline.split.map(parseInt)
    Ls[n] = L

var f = true

while f:
    f = false
    cnt += 1
    for i in 0..<N:
        if Ls[i][0] < cnt:
            continue
        f = true
        ans.add(Ls[i][cnt])

for i,a in ans:
    stdout.write(a)
    if i == ans.high:
        stdout.write("\n")
    else:
        stdout.write(" ")
0