結果

問題 No.365 ジェンガソート
ユーザー rocoderrocoder
提出日時 2017-07-26 06:18:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 20,772 KB
最終ジャッジ日時 2024-04-17 23:44:52
合計ジャッジ時間 3,440 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,880 KB
testcase_01 AC 26 ms
10,880 KB
testcase_02 AC 29 ms
10,752 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 28 ms
10,752 KB
testcase_05 AC 25 ms
10,752 KB
testcase_06 AC 26 ms
10,752 KB
testcase_07 AC 27 ms
10,752 KB
testcase_08 AC 27 ms
10,752 KB
testcase_09 AC 28 ms
10,880 KB
testcase_10 AC 24 ms
10,752 KB
testcase_11 AC 29 ms
10,752 KB
testcase_12 AC 30 ms
10,752 KB
testcase_13 AC 25 ms
10,752 KB
testcase_14 AC 30 ms
10,752 KB
testcase_15 AC 29 ms
10,752 KB
testcase_16 AC 68 ms
18,400 KB
testcase_17 AC 90 ms
20,136 KB
testcase_18 AC 34 ms
11,520 KB
testcase_19 AC 97 ms
19,900 KB
testcase_20 AC 53 ms
13,696 KB
testcase_21 AC 41 ms
13,056 KB
testcase_22 AC 69 ms
18,312 KB
testcase_23 AC 55 ms
15,420 KB
testcase_24 AC 64 ms
17,752 KB
testcase_25 AC 40 ms
12,800 KB
testcase_26 AC 57 ms
16,300 KB
testcase_27 AC 81 ms
20,612 KB
testcase_28 AC 63 ms
16,416 KB
testcase_29 AC 77 ms
19,064 KB
testcase_30 AC 57 ms
16,656 KB
testcase_31 AC 40 ms
13,312 KB
testcase_32 AC 40 ms
13,312 KB
testcase_33 AC 76 ms
20,540 KB
testcase_34 AC 38 ms
12,544 KB
testcase_35 AC 71 ms
18,036 KB
testcase_36 AC 106 ms
20,648 KB
testcase_37 AC 80 ms
20,652 KB
testcase_38 AC 75 ms
20,772 KB
testcase_39 AC 92 ms
20,644 KB
testcase_40 AC 93 ms
20,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#jenga
N=int(input())
a=[int(i) for i in input().split()]
t=N
i=N-1
c=0
#rint (a)
while i>=0 and t>0:
    while i>=0 and a[i]!=t:
   #     print (i)
        i-=1
    if i>=0 and a[i]==t:
        c+=1
 #       print (i)
     #   print (t)
        i-=1
    t-=1
print (N-c)
0