結果

問題 No.365 ジェンガソート
ユーザー ああいいああいい
提出日時 2022-03-30 15:43:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 186 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 82,468 KB
実行使用メモリ 99,312 KB
最終ジャッジ日時 2024-04-27 01:05:36
合計ジャッジ時間 3,517 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
51,904 KB
testcase_01 AC 32 ms
52,688 KB
testcase_02 AC 34 ms
52,392 KB
testcase_03 AC 33 ms
52,308 KB
testcase_04 AC 33 ms
51,776 KB
testcase_05 AC 32 ms
52,504 KB
testcase_06 AC 33 ms
53,700 KB
testcase_07 AC 32 ms
51,964 KB
testcase_08 AC 32 ms
53,164 KB
testcase_09 AC 32 ms
51,980 KB
testcase_10 AC 33 ms
52,584 KB
testcase_11 AC 32 ms
53,024 KB
testcase_12 AC 31 ms
52,376 KB
testcase_13 AC 32 ms
53,172 KB
testcase_14 AC 34 ms
52,000 KB
testcase_15 AC 34 ms
53,740 KB
testcase_16 AC 63 ms
88,872 KB
testcase_17 AC 69 ms
97,560 KB
testcase_18 AC 40 ms
62,188 KB
testcase_19 AC 72 ms
97,996 KB
testcase_20 AC 48 ms
71,280 KB
testcase_21 AC 45 ms
68,516 KB
testcase_22 AC 63 ms
89,436 KB
testcase_23 AC 52 ms
75,968 KB
testcase_24 AC 62 ms
85,700 KB
testcase_25 AC 43 ms
66,808 KB
testcase_26 AC 54 ms
80,156 KB
testcase_27 AC 69 ms
98,016 KB
testcase_28 AC 57 ms
82,712 KB
testcase_29 AC 71 ms
93,632 KB
testcase_30 AC 56 ms
84,428 KB
testcase_31 AC 44 ms
68,860 KB
testcase_32 AC 42 ms
68,588 KB
testcase_33 AC 70 ms
97,524 KB
testcase_34 AC 41 ms
65,436 KB
testcase_35 AC 59 ms
85,740 KB
testcase_36 AC 72 ms
99,312 KB
testcase_37 AC 69 ms
98,376 KB
testcase_38 AC 68 ms
97,144 KB
testcase_39 AC 71 ms
98,336 KB
testcase_40 AC 69 ms
97,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))
D = {v:i for i,v in enumerate(A)}

import sys
for i in range(N,1,-1):
    if D[i] < D[i-1]:
        print(i-1)
        exit()
print(0)
0