結果

問題 No.893 お客様を誘導せよ
ユーザー 6soukiti296soukiti29
提出日時 2019-09-27 21:52:17
言語 Nim
(2.0.2)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 569 bytes
コンパイル時間 3,128 ms
コンパイル使用メモリ 65,660 KB
実行使用メモリ 6,324 KB
最終ジャッジ日時 2023-10-24 17:53:11
合計ジャッジ時間 3,923 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 6 ms
4,348 KB
testcase_03 AC 15 ms
5,080 KB
testcase_04 AC 14 ms
5,072 KB
testcase_05 AC 14 ms
4,988 KB
testcase_06 AC 10 ms
4,396 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 28 ms
6,324 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 3 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sequtils,strutils
var
    N = stdin.readline.parseInt
    ans = newSeq[int](0)
    Ls : array[1005, array[105, int]]
    cnt = 0

for n in 0..<N:
    var L = stdin.readline.split.map(parseInt)
    if L[0] > 100 or N > 1000:
        break
    for i,p in L:
        Ls[n][i] = p

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