結果

問題 No.365 ジェンガソート
ユーザー DrDrpilotDrDrpilot
提出日時 2022-02-23 18:15:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 164 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,612 KB
実行使用メモリ 19,704 KB
最終ジャッジ日時 2023-09-14 11:08:35
合計ジャッジ時間 3,515 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,872 KB
testcase_01 AC 15 ms
7,948 KB
testcase_02 AC 15 ms
7,848 KB
testcase_03 AC 15 ms
7,868 KB
testcase_04 AC 15 ms
7,848 KB
testcase_05 AC 16 ms
7,812 KB
testcase_06 AC 15 ms
7,808 KB
testcase_07 AC 15 ms
7,812 KB
testcase_08 AC 15 ms
7,920 KB
testcase_09 AC 15 ms
7,804 KB
testcase_10 AC 16 ms
7,828 KB
testcase_11 AC 15 ms
7,808 KB
testcase_12 AC 14 ms
7,856 KB
testcase_13 AC 15 ms
7,836 KB
testcase_14 AC 15 ms
7,860 KB
testcase_15 AC 16 ms
7,952 KB
testcase_16 AC 53 ms
17,016 KB
testcase_17 AC 59 ms
18,812 KB
testcase_18 AC 18 ms
9,048 KB
testcase_19 AC 59 ms
18,936 KB
testcase_20 AC 29 ms
11,764 KB
testcase_21 AC 26 ms
10,672 KB
testcase_22 AC 50 ms
16,368 KB
testcase_23 AC 37 ms
13,112 KB
testcase_24 AC 48 ms
15,712 KB
testcase_25 AC 26 ms
10,432 KB
testcase_26 AC 41 ms
14,324 KB
testcase_27 AC 61 ms
19,552 KB
testcase_28 AC 42 ms
14,740 KB
testcase_29 AC 57 ms
17,784 KB
testcase_30 AC 43 ms
14,708 KB
testcase_31 AC 28 ms
11,128 KB
testcase_32 AC 27 ms
11,084 KB
testcase_33 AC 61 ms
19,216 KB
testcase_34 AC 23 ms
9,948 KB
testcase_35 AC 49 ms
16,360 KB
testcase_36 AC 62 ms
19,676 KB
testcase_37 AC 65 ms
19,640 KB
testcase_38 AC 62 ms
19,704 KB
testcase_39 AC 63 ms
19,640 KB
testcase_40 AC 63 ms
19,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
ans=0
target=n
for i in range(n-1,-1,-1):
    if a[i]==target:
        target-=1
    else:
        ans+=1
print(ans)
0