結果

問題 No.365 ジェンガソート
ユーザー roiti46roiti46
提出日時 2016-04-29 22:53:23
言語 Python2
(2.7.18)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 1,144 ms
コンパイル使用メモリ 6,652 KB
実行使用メモリ 16,512 KB
最終ジャッジ日時 2023-08-02 06:46:53
合計ジャッジ時間 4,696 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
7,956 KB
testcase_01 AC 23 ms
7,720 KB
testcase_02 AC 22 ms
7,724 KB
testcase_03 AC 24 ms
7,744 KB
testcase_04 AC 23 ms
7,952 KB
testcase_05 AC 21 ms
7,784 KB
testcase_06 AC 23 ms
7,768 KB
testcase_07 AC 23 ms
7,924 KB
testcase_08 AC 22 ms
7,768 KB
testcase_09 AC 21 ms
7,956 KB
testcase_10 AC 23 ms
7,744 KB
testcase_11 AC 22 ms
7,916 KB
testcase_12 AC 22 ms
7,856 KB
testcase_13 AC 22 ms
7,796 KB
testcase_14 AC 22 ms
7,720 KB
testcase_15 AC 22 ms
7,968 KB
testcase_16 AC 71 ms
14,392 KB
testcase_17 AC 88 ms
15,856 KB
testcase_18 AC 28 ms
8,240 KB
testcase_19 AC 88 ms
15,816 KB
testcase_20 AC 44 ms
10,232 KB
testcase_21 AC 38 ms
9,584 KB
testcase_22 AC 72 ms
14,152 KB
testcase_23 AC 50 ms
11,436 KB
testcase_24 AC 69 ms
13,700 KB
testcase_25 AC 34 ms
9,628 KB
testcase_26 AC 58 ms
12,476 KB
testcase_27 AC 88 ms
16,168 KB
testcase_28 AC 61 ms
12,388 KB
testcase_29 AC 83 ms
15,340 KB
testcase_30 AC 62 ms
12,768 KB
testcase_31 AC 41 ms
10,124 KB
testcase_32 AC 38 ms
9,796 KB
testcase_33 AC 90 ms
16,188 KB
testcase_34 AC 33 ms
9,156 KB
testcase_35 AC 70 ms
13,956 KB
testcase_36 AC 91 ms
16,412 KB
testcase_37 AC 89 ms
16,512 KB
testcase_38 AC 90 ms
16,412 KB
testcase_39 AC 91 ms
16,360 KB
testcase_40 AC 91 ms
16,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

N = int(raw_input())
a = map(int, raw_input().split())

ans = 0
k = N
while a:
    x = a.pop()
    if x == k:
        k -= 1
    else:
        ans += 1
print ans
0