結果

問題 No.365 ジェンガソート
ユーザー GrayCoderGrayCoder
提出日時 2018-02-18 16:44:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 28,964 KB
最終ジャッジ日時 2023-09-07 02:03:44
合計ジャッジ時間 4,680 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,796 KB
testcase_01 AC 17 ms
7,868 KB
testcase_02 AC 17 ms
7,820 KB
testcase_03 AC 16 ms
7,928 KB
testcase_04 AC 16 ms
7,880 KB
testcase_05 AC 16 ms
7,880 KB
testcase_06 AC 16 ms
7,928 KB
testcase_07 AC 16 ms
7,864 KB
testcase_08 AC 16 ms
7,836 KB
testcase_09 AC 16 ms
7,788 KB
testcase_10 AC 16 ms
7,960 KB
testcase_11 AC 16 ms
7,780 KB
testcase_12 AC 16 ms
7,960 KB
testcase_13 AC 16 ms
7,884 KB
testcase_14 AC 16 ms
7,836 KB
testcase_15 AC 16 ms
7,920 KB
testcase_16 AC 51 ms
21,236 KB
testcase_17 AC 65 ms
28,224 KB
testcase_18 AC 20 ms
9,556 KB
testcase_19 AC 67 ms
28,552 KB
testcase_20 AC 34 ms
13,928 KB
testcase_21 AC 27 ms
13,068 KB
testcase_22 AC 50 ms
21,168 KB
testcase_23 AC 36 ms
18,292 KB
testcase_24 AC 47 ms
20,816 KB
testcase_25 AC 25 ms
11,448 KB
testcase_26 AC 41 ms
18,576 KB
testcase_27 AC 62 ms
28,776 KB
testcase_28 AC 41 ms
19,424 KB
testcase_29 AC 60 ms
28,076 KB
testcase_30 AC 42 ms
18,872 KB
testcase_31 AC 28 ms
13,248 KB
testcase_32 AC 28 ms
13,200 KB
testcase_33 AC 63 ms
28,544 KB
testcase_34 AC 23 ms
11,052 KB
testcase_35 AC 48 ms
20,608 KB
testcase_36 AC 75 ms
28,848 KB
testcase_37 AC 60 ms
28,936 KB
testcase_38 AC 63 ms
28,964 KB
testcase_39 AC 67 ms
28,788 KB
testcase_40 AC 68 ms
28,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    A = {j: i for i, j in enumerate(map(int, input().split()))}

    len_ = 0
    for i in range(N, 1, -1):
        if A[i] > A[i-1]:
            len_ += 1
        else:
            break
    print(N - 1 - len_)

main()
0