結果

問題 No.365 ジェンガソート
ユーザー AEnAEn
提出日時 2022-05-13 23:20:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 91,212 KB
最終ジャッジ日時 2023-09-29 09:01:37
合計ジャッジ時間 6,110 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,332 KB
testcase_01 AC 75 ms
71,208 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 76 ms
71,364 KB
testcase_05 AC 74 ms
71,396 KB
testcase_06 AC 73 ms
71,428 KB
testcase_07 AC 76 ms
71,388 KB
testcase_08 AC 76 ms
71,512 KB
testcase_09 AC 76 ms
71,188 KB
testcase_10 AC 74 ms
71,492 KB
testcase_11 AC 75 ms
71,212 KB
testcase_12 AC 76 ms
71,296 KB
testcase_13 AC 73 ms
71,320 KB
testcase_14 AC 74 ms
71,216 KB
testcase_15 AC 74 ms
71,344 KB
testcase_16 AC 95 ms
87,424 KB
testcase_17 AC 102 ms
90,956 KB
testcase_18 AC 81 ms
76,308 KB
testcase_19 AC 100 ms
90,760 KB
testcase_20 AC 85 ms
79,356 KB
testcase_21 AC 84 ms
77,964 KB
testcase_22 AC 97 ms
87,140 KB
testcase_23 AC 89 ms
81,360 KB
testcase_24 AC 95 ms
86,036 KB
testcase_25 AC 85 ms
77,596 KB
testcase_26 AC 90 ms
83,260 KB
testcase_27 AC 98 ms
91,076 KB
testcase_28 AC 91 ms
84,532 KB
testcase_29 AC 96 ms
89,008 KB
testcase_30 AC 90 ms
84,656 KB
testcase_31 AC 83 ms
78,724 KB
testcase_32 AC 84 ms
78,676 KB
testcase_33 AC 97 ms
90,840 KB
testcase_34 AC 81 ms
76,736 KB
testcase_35 AC 92 ms
85,916 KB
testcase_36 WA -
testcase_37 AC 93 ms
90,892 KB
testcase_38 AC 97 ms
91,032 KB
testcase_39 AC 99 ms
91,212 KB
testcase_40 AC 97 ms
91,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
isok = [False]*N
num = N
for i in reversed(range(N)):
    if A[i] == num:
        isok[num-1] = True
        num -= 1

res = 0
for i in reversed(range(N)):
    if isok[i]:
        res += 1
    else:
        print(N-res)
        exit()
0