結果

問題 No.365 ジェンガソート
ユーザー roiti46roiti46
提出日時 2016-04-29 22:53:23
言語 Python2
(2.7.18)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 421 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 16,808 KB
最終ジャッジ日時 2024-04-20 06:37:03
合計ジャッジ時間 4,244 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
8,192 KB
testcase_01 AC 23 ms
8,192 KB
testcase_02 AC 19 ms
8,192 KB
testcase_03 AC 20 ms
8,064 KB
testcase_04 AC 20 ms
8,064 KB
testcase_05 AC 23 ms
8,192 KB
testcase_06 AC 23 ms
8,192 KB
testcase_07 AC 21 ms
8,192 KB
testcase_08 AC 24 ms
8,192 KB
testcase_09 AC 22 ms
8,192 KB
testcase_10 AC 21 ms
8,192 KB
testcase_11 AC 22 ms
8,192 KB
testcase_12 AC 22 ms
8,064 KB
testcase_13 AC 22 ms
8,320 KB
testcase_14 AC 21 ms
8,064 KB
testcase_15 AC 22 ms
8,192 KB
testcase_16 AC 77 ms
14,724 KB
testcase_17 AC 89 ms
16,132 KB
testcase_18 AC 28 ms
8,832 KB
testcase_19 AC 88 ms
16,104 KB
testcase_20 AC 44 ms
10,700 KB
testcase_21 AC 38 ms
10,112 KB
testcase_22 AC 74 ms
14,504 KB
testcase_23 AC 53 ms
11,924 KB
testcase_24 AC 73 ms
14,196 KB
testcase_25 AC 37 ms
9,984 KB
testcase_26 AC 63 ms
12,916 KB
testcase_27 AC 95 ms
16,700 KB
testcase_28 AC 66 ms
13,180 KB
testcase_29 AC 87 ms
15,652 KB
testcase_30 AC 67 ms
13,276 KB
testcase_31 AC 42 ms
10,452 KB
testcase_32 AC 40 ms
10,240 KB
testcase_33 AC 92 ms
16,512 KB
testcase_34 AC 35 ms
9,600 KB
testcase_35 AC 75 ms
14,368 KB
testcase_36 AC 96 ms
16,680 KB
testcase_37 AC 95 ms
16,808 KB
testcase_38 AC 94 ms
16,680 KB
testcase_39 AC 98 ms
16,684 KB
testcase_40 AC 95 ms
16,684 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