結果

問題 No.365 ジェンガソート
ユーザー AT274_AT274_
提出日時 2019-10-24 21:18:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 62 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 19,704 KB
最終ジャッジ日時 2023-09-25 06:55:01
合計ジャッジ時間 3,481 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,800 KB
testcase_01 AC 15 ms
7,916 KB
testcase_02 AC 15 ms
7,808 KB
testcase_03 AC 15 ms
7,756 KB
testcase_04 AC 16 ms
7,932 KB
testcase_05 AC 15 ms
7,880 KB
testcase_06 AC 15 ms
7,812 KB
testcase_07 AC 14 ms
7,808 KB
testcase_08 AC 16 ms
7,856 KB
testcase_09 AC 14 ms
7,800 KB
testcase_10 AC 14 ms
7,812 KB
testcase_11 AC 14 ms
7,908 KB
testcase_12 AC 15 ms
7,840 KB
testcase_13 AC 15 ms
7,872 KB
testcase_14 AC 15 ms
7,756 KB
testcase_15 AC 14 ms
7,756 KB
testcase_16 AC 49 ms
16,852 KB
testcase_17 AC 57 ms
18,884 KB
testcase_18 AC 18 ms
8,960 KB
testcase_19 AC 56 ms
18,856 KB
testcase_20 AC 28 ms
11,776 KB
testcase_21 AC 26 ms
10,656 KB
testcase_22 AC 47 ms
16,248 KB
testcase_23 AC 34 ms
13,120 KB
testcase_24 AC 46 ms
15,860 KB
testcase_25 AC 25 ms
10,352 KB
testcase_26 AC 39 ms
14,276 KB
testcase_27 AC 59 ms
19,544 KB
testcase_28 AC 41 ms
14,760 KB
testcase_29 AC 53 ms
17,848 KB
testcase_30 AC 41 ms
14,740 KB
testcase_31 AC 27 ms
11,032 KB
testcase_32 AC 26 ms
11,064 KB
testcase_33 AC 58 ms
19,204 KB
testcase_34 AC 22 ms
9,856 KB
testcase_35 AC 47 ms
16,344 KB
testcase_36 AC 59 ms
19,576 KB
testcase_37 AC 58 ms
19,680 KB
testcase_38 AC 62 ms
19,704 KB
testcase_39 AC 61 ms
19,624 KB
testcase_40 AC 60 ms
19,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

next_expected_a = N
ans = 0
for a in A[::-1]:
    if a == next_expected_a:
        next_expected_a -= 1
    else:
        ans += 1

print(ans)
0