結果

問題 No.365 ジェンガソート
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2018-06-22 11:30:31
言語 Nim
(2.0.2)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 222 bytes
コンパイル時間 3,279 ms
コンパイル使用メモリ 69,400 KB
実行使用メモリ 12,960 KB
最終ジャッジ日時 2023-09-13 07:53:52
合計ジャッジ時間 5,407 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 18 ms
10,304 KB
testcase_17 AC 21 ms
11,068 KB
testcase_18 AC 3 ms
4,380 KB
testcase_19 AC 21 ms
11,016 KB
testcase_20 AC 7 ms
5,424 KB
testcase_21 AC 6 ms
4,848 KB
testcase_22 AC 18 ms
10,268 KB
testcase_23 AC 10 ms
6,784 KB
testcase_24 AC 17 ms
10,336 KB
testcase_25 AC 6 ms
4,800 KB
testcase_26 AC 12 ms
7,492 KB
testcase_27 AC 21 ms
11,460 KB
testcase_28 AC 14 ms
8,820 KB
testcase_29 AC 20 ms
11,028 KB
testcase_30 AC 15 ms
8,972 KB
testcase_31 AC 6 ms
5,208 KB
testcase_32 AC 6 ms
5,084 KB
testcase_33 AC 21 ms
11,384 KB
testcase_34 AC 5 ms
4,512 KB
testcase_35 AC 18 ms
10,220 KB
testcase_36 AC 22 ms
12,960 KB
testcase_37 AC 23 ms
12,752 KB
testcase_38 AC 23 ms
12,888 KB
testcase_39 AC 23 ms
12,892 KB
testcase_40 AC 22 ms
12,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import strutils, sequtils, algorithm

let
  N, a = stdin.readLine.split.map parseInt
var
  cnt = 0
  cnt_L = a.len

for i, r in a.reversed:
  if r < cnt_L:
    cnt = max(cnt, r)

  if r == cnt_L:
    cnt_L -= 1


echo cnt
0