結果

問題 No.182 新規性の虜
ユーザー bellangeldindonbellangeldindon
提出日時 2019-05-10 09:38:12
言語 Python2
(2.7.18)
結果
AC  
実行時間 112 ms / 5,000 ms
コード長 260 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 6,664 KB
実行使用メモリ 14,472 KB
最終ジャッジ日時 2023-09-14 17:51:00
合計ジャッジ時間 3,821 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,824 KB
testcase_01 AC 12 ms
5,832 KB
testcase_02 AC 11 ms
6,012 KB
testcase_03 AC 11 ms
6,016 KB
testcase_04 AC 11 ms
5,896 KB
testcase_05 AC 11 ms
5,904 KB
testcase_06 AC 11 ms
5,820 KB
testcase_07 AC 11 ms
5,824 KB
testcase_08 AC 68 ms
10,208 KB
testcase_09 AC 112 ms
13,012 KB
testcase_10 AC 94 ms
12,248 KB
testcase_11 AC 79 ms
10,900 KB
testcase_12 AC 38 ms
7,976 KB
testcase_13 AC 11 ms
6,072 KB
testcase_14 AC 12 ms
5,948 KB
testcase_15 AC 11 ms
5,868 KB
testcase_16 AC 11 ms
5,824 KB
testcase_17 AC 11 ms
5,888 KB
testcase_18 AC 91 ms
12,272 KB
testcase_19 AC 68 ms
10,192 KB
testcase_20 AC 45 ms
8,576 KB
testcase_21 AC 106 ms
13,140 KB
testcase_22 AC 54 ms
9,384 KB
testcase_23 AC 11 ms
5,944 KB
testcase_24 AC 85 ms
14,472 KB
testcase_25 AC 71 ms
9,608 KB
testcase_26 AC 23 ms
6,796 KB
testcase_27 AC 11 ms
6,124 KB
evil01.txt AC 86 ms
14,428 KB
evil02.txt AC 86 ms
14,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
A = map(int, raw_input().split())
A.sort()
cnt = 0
flag = False
tmp = -1
for i in range(0, N):
	if flag:
		if A[i] != tmp:
			cnt += 1
		else:
			flag = False
	else:
		if A[i] != tmp:
			flag = True
	tmp = A[i]
if flag:
	cnt += 1
print cnt
0