結果

問題 No.365 ジェンガソート
ユーザー Ryushi-techRyushi-tech
提出日時 2020-06-23 23:35:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 167 bytes
コンパイル時間 1,401 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 90,928 KB
最終ジャッジ日時 2023-09-16 20:20:19
合計ジャッジ時間 5,380 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,336 KB
testcase_01 AC 65 ms
71,276 KB
testcase_02 AC 68 ms
70,888 KB
testcase_03 AC 68 ms
71,312 KB
testcase_04 AC 71 ms
71,372 KB
testcase_05 AC 66 ms
71,368 KB
testcase_06 AC 66 ms
71,152 KB
testcase_07 AC 67 ms
71,076 KB
testcase_08 AC 66 ms
71,372 KB
testcase_09 AC 67 ms
71,208 KB
testcase_10 AC 67 ms
71,204 KB
testcase_11 AC 76 ms
71,432 KB
testcase_12 AC 70 ms
71,200 KB
testcase_13 AC 67 ms
71,384 KB
testcase_14 AC 68 ms
71,276 KB
testcase_15 AC 67 ms
71,204 KB
testcase_16 AC 84 ms
86,956 KB
testcase_17 AC 90 ms
90,492 KB
testcase_18 AC 73 ms
76,228 KB
testcase_19 AC 88 ms
90,516 KB
testcase_20 AC 77 ms
78,900 KB
testcase_21 AC 74 ms
77,660 KB
testcase_22 AC 85 ms
86,896 KB
testcase_23 AC 79 ms
80,856 KB
testcase_24 AC 85 ms
85,728 KB
testcase_25 AC 75 ms
77,212 KB
testcase_26 AC 81 ms
83,084 KB
testcase_27 AC 90 ms
90,604 KB
testcase_28 AC 84 ms
84,072 KB
testcase_29 AC 87 ms
88,876 KB
testcase_30 AC 82 ms
83,912 KB
testcase_31 AC 77 ms
78,476 KB
testcase_32 AC 75 ms
78,384 KB
testcase_33 AC 89 ms
90,628 KB
testcase_34 AC 73 ms
76,528 KB
testcase_35 AC 85 ms
85,768 KB
testcase_36 AC 90 ms
90,928 KB
testcase_37 AC 87 ms
90,572 KB
testcase_38 AC 88 ms
90,788 KB
testcase_39 AC 91 ms
90,676 KB
testcase_40 AC 89 ms
90,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

res = 0
tmp = N
for j, y in enumerate(S[::-1]):
    if y == tmp:
        res += 1
        tmp -= 1
print(N - res)
0