結果

問題 No.182 新規性の虜
ユーザー kongarishisyamokongarishisyamo
提出日時 2016-03-01 05:34:43
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 300 bytes
コンパイル時間 445 ms
コンパイル使用メモリ 60,164 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-24 19:16:47
合計ジャッジ時間 3,383 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 1 ms
4,348 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 1 ms
4,348 KB
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 AC 1 ms
4,348 KB
evil01.txt RE -
evil02.txt RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>

using namespace std;

#define NMAX 10000

int main(){

	int N;
	int A[NMAX];
	int ans=0;

	cin>>N;

	for(int i=0;i<N;i++){
		cin>>A[i];
	}

	sort(A,A+N);

	for(int i=0;i<N;i++){
		if((i==0||A[i]!=A[i-1])&&(i==N-1||A[i]!=A[i+1])) ans++;
	}

	cout<<ans<<endl;

}
0