結果

問題 No.365 ジェンガソート
ユーザー UEUEUE66UEUEUE66
提出日時 2019-07-17 17:33:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 216 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 19,776 KB
最終ジャッジ日時 2023-08-24 15:10:07
合計ジャッジ時間 3,158 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,792 KB
testcase_01 AC 14 ms
7,892 KB
testcase_02 AC 15 ms
7,860 KB
testcase_03 AC 14 ms
7,828 KB
testcase_04 AC 15 ms
7,780 KB
testcase_05 AC 15 ms
7,828 KB
testcase_06 AC 15 ms
7,948 KB
testcase_07 AC 15 ms
7,780 KB
testcase_08 AC 15 ms
7,900 KB
testcase_09 AC 15 ms
7,740 KB
testcase_10 AC 15 ms
7,820 KB
testcase_11 AC 14 ms
7,856 KB
testcase_12 AC 16 ms
7,784 KB
testcase_13 AC 15 ms
7,800 KB
testcase_14 AC 15 ms
7,732 KB
testcase_15 AC 15 ms
7,776 KB
testcase_16 AC 40 ms
16,924 KB
testcase_17 AC 48 ms
18,916 KB
testcase_18 AC 18 ms
9,104 KB
testcase_19 AC 48 ms
18,948 KB
testcase_20 AC 25 ms
11,668 KB
testcase_21 AC 22 ms
10,600 KB
testcase_22 AC 39 ms
16,388 KB
testcase_23 AC 29 ms
13,232 KB
testcase_24 AC 38 ms
15,700 KB
testcase_25 AC 22 ms
10,348 KB
testcase_26 AC 33 ms
14,276 KB
testcase_27 AC 48 ms
19,600 KB
testcase_28 AC 34 ms
14,768 KB
testcase_29 AC 43 ms
17,856 KB
testcase_30 AC 34 ms
14,780 KB
testcase_31 AC 24 ms
11,008 KB
testcase_32 AC 24 ms
10,984 KB
testcase_33 AC 47 ms
19,200 KB
testcase_34 AC 20 ms
10,080 KB
testcase_35 AC 39 ms
16,340 KB
testcase_36 AC 51 ms
19,620 KB
testcase_37 AC 49 ms
19,660 KB
testcase_38 AC 48 ms
19,588 KB
testcase_39 AC 49 ms
19,656 KB
testcase_40 AC 49 ms
19,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def jenga_sort(n, a):
    ans = n
    for i in reversed(range(n)):
        if a[i] == ans:
            ans -= 1
    return ans


N = int(input())
A = list(map(int, input().split()))
count = 0

print(jenga_sort(N, A))
0