結果

問題 No.893 お客様を誘導せよ
コンテスト
ユーザー varrho
提出日時 2019-09-28 02:52:44
言語 Nim
(2.2.8)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 477 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,618 ms
コンパイル使用メモリ 68,788 KB
実行使用メモリ 88,576 KB
最終ジャッジ日時 2026-04-12 12:26:02
合計ジャッジ時間 6,701 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import algorithm, sequtils, strutils
let
  n: int = stdin.readline.parseInt
  a: seq[seq[int]] = mapIt(0..<n, stdin.readline.split.map(parseInt))
var
  b: seq[seq[int]] = newSeqwith(n, newSeq[int](10000))
  ans: seq[int]
for i in 0..<n:
  for j in 1..<a[i].len:
    b[i][j - 1] = a[i][j]
for i in 0..<10000:
  var tmp: seq[int]
  for j in 0..<n:
    if b[j][i] != 0:
      tmp.add(b[j][i])
  tmp.sort()
  ans.add(tmp)
for i in ans:
  stdout.write(i)
  stdout.write(' ')
echo ""
0