結果

問題 No.893 お客様を誘導せよ
ユーザー 6soukiti296soukiti29
提出日時 2019-09-27 21:42:54
言語 Nim
(2.2.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 504 bytes
コンパイル時間 3,346 ms
コンパイル使用メモリ 65,800 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 10:08:45
合計ジャッジ時間 4,221 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

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