結果

問題 No.504 ゲーム大会(ランキング)
ユーザー varrhovarrho
提出日時 2019-09-20 17:16:54
言語 Nim
(2.0.2)
結果
AC  
実行時間 170 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 4,144 ms
コンパイル使用メモリ 71,816 KB
実行使用メモリ 7,712 KB
最終ジャッジ日時 2023-10-12 09:16:05
合計ジャッジ時間 6,858 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,372 KB
testcase_07 AC 166 ms
7,480 KB
testcase_08 AC 165 ms
7,496 KB
testcase_09 AC 169 ms
7,520 KB
testcase_10 AC 167 ms
7,704 KB
testcase_11 AC 169 ms
7,712 KB
testcase_12 AC 166 ms
7,648 KB
testcase_13 AC 164 ms
7,604 KB
testcase_14 AC 170 ms
7,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sequtils, strutils
let
  n: int = stdin.readline.parseInt
  a: seq[int] = mapIt(0..<n, stdin.readline.parseInt)
var ans: seq[int] = @[1]
for i in 1..<n:
  var tmp: int = ans[i - 1]
  if a[0] < a[i]:
    tmp.inc
  ans.add(tmp)
for i in ans:
  echo i
0