結果

問題 No.365 ジェンガソート
ユーザー H3PO4H3PO4
提出日時 2020-06-28 10:29:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 248 ms
コンパイル使用メモリ 10,680 KB
実行使用メモリ 19,620 KB
最終ジャッジ日時 2023-09-21 11:09:08
合計ジャッジ時間 3,544 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,932 KB
testcase_01 AC 15 ms
7,844 KB
testcase_02 AC 15 ms
7,916 KB
testcase_03 AC 15 ms
7,844 KB
testcase_04 AC 15 ms
7,816 KB
testcase_05 AC 15 ms
7,820 KB
testcase_06 AC 15 ms
7,748 KB
testcase_07 AC 15 ms
7,780 KB
testcase_08 AC 14 ms
7,820 KB
testcase_09 AC 15 ms
7,780 KB
testcase_10 AC 15 ms
7,828 KB
testcase_11 AC 15 ms
7,908 KB
testcase_12 AC 15 ms
7,924 KB
testcase_13 AC 15 ms
7,816 KB
testcase_14 AC 15 ms
7,780 KB
testcase_15 AC 15 ms
7,776 KB
testcase_16 AC 48 ms
16,944 KB
testcase_17 AC 58 ms
18,676 KB
testcase_18 AC 18 ms
9,164 KB
testcase_19 AC 56 ms
18,508 KB
testcase_20 AC 28 ms
11,980 KB
testcase_21 AC 25 ms
10,664 KB
testcase_22 AC 47 ms
16,916 KB
testcase_23 AC 33 ms
12,908 KB
testcase_24 AC 44 ms
15,872 KB
testcase_25 AC 23 ms
10,488 KB
testcase_26 AC 38 ms
14,388 KB
testcase_27 AC 57 ms
19,536 KB
testcase_28 AC 39 ms
14,612 KB
testcase_29 AC 52 ms
18,228 KB
testcase_30 AC 39 ms
14,884 KB
testcase_31 AC 25 ms
11,124 KB
testcase_32 AC 24 ms
10,968 KB
testcase_33 AC 55 ms
19,448 KB
testcase_34 AC 21 ms
10,008 KB
testcase_35 AC 45 ms
15,812 KB
testcase_36 AC 57 ms
19,588 KB
testcase_37 AC 58 ms
19,600 KB
testcase_38 AC 57 ms
19,596 KB
testcase_39 AC 58 ms
19,620 KB
testcase_40 AC 58 ms
19,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = tuple(map(int, input().split()))

ans = 0
cur = N
for a in reversed(A):
    if a == cur:
        cur -= 1
    else:
        ans += 1
print(ans)
0