結果
問題 | No.893 お客様を誘導せよ |
ユーザー |
|
提出日時 | 2019-09-27 22:12:40 |
言語 | Nim (2.2.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 501 bytes |
コンパイル時間 | 3,924 ms |
コンパイル使用メモリ | 66,568 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-24 16:34:26 |
合計ジャッジ時間 | 4,580 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 2 RE * 9 |
ソースコード
import algorithm, sequtils, strutils var n: int = stdin.readline.parseInt a: seq[seq[int]] = mapIt(0..<n, stdin.readline.split.map(parseInt)) ans: seq[int] for i in 0..<n: a[i].delete(0) for i in 0..<n: if a[i].len == 0: a.delete(i) n.dec while a.len > 0: var tmp: seq[int] for i in 0..<n: tmp.add(a[i][0]) a[i].delete(0) for i in 0..<n: if a[i].len == 0: a.delete(i) n.dec tmp.sort() ans.add(tmp) for i in ans: stdout.write(i) stdout.write(" ")