結果

問題 No.365 ジェンガソート
ユーザー Snark86Snark86
提出日時 2016-04-29 23:20:45
言語 Python2
(2.7.18)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 151 bytes
コンパイル時間 652 ms
コンパイル使用メモリ 6,668 KB
実行使用メモリ 14,516 KB
最終ジャッジ日時 2023-08-02 06:49:24
合計ジャッジ時間 3,717 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,888 KB
testcase_01 AC 11 ms
6,092 KB
testcase_02 AC 11 ms
5,952 KB
testcase_03 AC 10 ms
5,948 KB
testcase_04 AC 11 ms
5,864 KB
testcase_05 AC 10 ms
6,092 KB
testcase_06 AC 10 ms
5,952 KB
testcase_07 AC 10 ms
5,888 KB
testcase_08 AC 10 ms
5,944 KB
testcase_09 AC 10 ms
5,864 KB
testcase_10 AC 11 ms
5,944 KB
testcase_11 AC 11 ms
5,960 KB
testcase_12 AC 11 ms
6,008 KB
testcase_13 AC 10 ms
5,948 KB
testcase_14 AC 11 ms
5,928 KB
testcase_15 AC 10 ms
5,884 KB
testcase_16 AC 58 ms
12,324 KB
testcase_17 AC 69 ms
13,668 KB
testcase_18 AC 16 ms
6,484 KB
testcase_19 AC 66 ms
13,792 KB
testcase_20 AC 28 ms
8,564 KB
testcase_21 AC 25 ms
7,712 KB
testcase_22 AC 59 ms
12,304 KB
testcase_23 AC 38 ms
9,424 KB
testcase_24 AC 56 ms
12,136 KB
testcase_25 AC 24 ms
7,476 KB
testcase_26 AC 44 ms
10,644 KB
testcase_27 AC 69 ms
14,256 KB
testcase_28 AC 47 ms
10,844 KB
testcase_29 AC 67 ms
13,620 KB
testcase_30 AC 47 ms
10,788 KB
testcase_31 AC 27 ms
8,020 KB
testcase_32 AC 26 ms
7,960 KB
testcase_33 AC 70 ms
14,180 KB
testcase_34 AC 20 ms
7,112 KB
testcase_35 AC 54 ms
12,052 KB
testcase_36 AC 73 ms
14,512 KB
testcase_37 AC 74 ms
14,500 KB
testcase_38 AC 73 ms
14,448 KB
testcase_39 AC 73 ms
14,456 KB
testcase_40 AC 72 ms
14,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(raw_input())
a = map(int,raw_input().split())
a.reverse()

c = n
cnt = 0
for i in range(n):
	if a[i] == c:
		c -= 1
	else:
		cnt += 1
print cnt
0