結果

問題 No.182 新規性の虜
ユーザー yaoshimaxyaoshimax
提出日時 2015-05-09 18:48:57
言語 Python2
(2.7.18)
結果
AC  
実行時間 101 ms / 5,000 ms
コード長 175 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 6,504 KB
実行使用メモリ 14,496 KB
最終ジャッジ日時 2023-08-27 07:16:45
合計ジャッジ時間 2,400 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
6,120 KB
testcase_01 AC 9 ms
5,844 KB
testcase_02 AC 9 ms
5,952 KB
testcase_03 AC 10 ms
6,028 KB
testcase_04 AC 10 ms
5,972 KB
testcase_05 AC 10 ms
6,036 KB
testcase_06 AC 10 ms
5,972 KB
testcase_07 AC 10 ms
5,992 KB
testcase_08 AC 64 ms
10,332 KB
testcase_09 AC 101 ms
13,168 KB
testcase_10 AC 88 ms
12,144 KB
testcase_11 AC 77 ms
10,912 KB
testcase_12 AC 38 ms
7,996 KB
testcase_13 AC 10 ms
6,136 KB
testcase_14 AC 9 ms
5,952 KB
testcase_15 AC 10 ms
5,852 KB
testcase_16 AC 11 ms
5,844 KB
testcase_17 AC 10 ms
5,928 KB
testcase_18 AC 79 ms
12,256 KB
testcase_19 AC 59 ms
10,352 KB
testcase_20 AC 39 ms
8,580 KB
testcase_21 AC 93 ms
12,984 KB
testcase_22 AC 48 ms
9,292 KB
testcase_23 AC 10 ms
5,852 KB
testcase_24 AC 84 ms
14,496 KB
testcase_25 AC 63 ms
7,288 KB
testcase_26 AC 20 ms
6,644 KB
testcase_27 AC 10 ms
5,992 KB
evil01.txt AC 87 ms
14,428 KB
evil02.txt AC 87 ms
14,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(raw_input())
A=map(int,raw_input().split())
A.sort()
ans=0
for i,a in enumerate(A):
    if not ((i>0 and A[i-1]==a) or (i+1<N and A[i+1]==a)) :
        ans+=1
print ans
0