結果

問題 No.893 お客様を誘導せよ
ユーザー varrhovarrho
提出日時 2019-09-28 02:52:44
言語 Nim
(2.0.0)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 477 bytes
コンパイル時間 6,297 ms
コンパイル使用メモリ 66,300 KB
実行使用メモリ 88,276 KB
最終ジャッジ日時 2023-10-25 23:45:33
合計ジャッジ時間 6,529 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 32 ms
23,668 KB
testcase_03 AC 104 ms
80,124 KB
testcase_04 AC 103 ms
78,060 KB
testcase_05 AC 95 ms
71,368 KB
testcase_06 AC 67 ms
50,008 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 128 ms
88,276 KB
testcase_09 AC 99 ms
84,508 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 97 ms
84,476 KB
testcase_12 AC 98 ms
84,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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