結果

問題 No.182 新規性の虜
ユーザー pluto77pluto77
提出日時 2016-02-26 09:27:14
言語 Python2
(2.7.18)
結果
AC  
実行時間 85 ms / 5,000 ms
コード長 300 bytes
コンパイル時間 1,070 ms
コンパイル使用メモリ 6,476 KB
実行使用メモリ 11,892 KB
最終ジャッジ日時 2023-08-27 10:28:23
合計ジャッジ時間 3,032 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,072 KB
testcase_01 AC 10 ms
5,900 KB
testcase_02 AC 11 ms
6,036 KB
testcase_03 AC 11 ms
6,048 KB
testcase_04 AC 10 ms
5,960 KB
testcase_05 AC 10 ms
5,988 KB
testcase_06 AC 10 ms
5,876 KB
testcase_07 AC 10 ms
5,928 KB
testcase_08 AC 53 ms
9,212 KB
testcase_09 AC 85 ms
11,216 KB
testcase_10 AC 73 ms
10,364 KB
testcase_11 AC 60 ms
9,820 KB
testcase_12 AC 30 ms
7,328 KB
testcase_13 AC 10 ms
6,012 KB
testcase_14 AC 10 ms
6,044 KB
testcase_15 AC 10 ms
6,036 KB
testcase_16 AC 10 ms
6,040 KB
testcase_17 AC 11 ms
5,992 KB
testcase_18 AC 58 ms
10,340 KB
testcase_19 AC 44 ms
8,880 KB
testcase_20 AC 30 ms
7,740 KB
testcase_21 AC 68 ms
10,988 KB
testcase_22 AC 38 ms
8,252 KB
testcase_23 AC 10 ms
6,048 KB
testcase_24 AC 53 ms
11,892 KB
testcase_25 AC 25 ms
6,700 KB
testcase_26 AC 19 ms
6,352 KB
testcase_27 AC 10 ms
5,960 KB
evil01.txt AC 55 ms
12,208 KB
evil02.txt AC 55 ms
12,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: utf-8
##yuki_182

import sys

n=int(raw_input())
s=[]
s=raw_input().split()
if len(s)!=n:
 print "error"
 sys.exit()
if n==1:
 print 1
 sys.exit()

s.sort()
cnt=0
if s[0]<s[1]:
 cnt=1
if s[-1]!=s[-2]:
 cnt+=1
for i in xrange(len(s)-2):
 if s[i]<s[i+1] and s[i+2]>s[i+1]:
  cnt+=1

print cnt
0