結果

問題 No.182 新規性の虜
ユーザー dnish
提出日時 2017-01-04 17:23:18
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 336 bytes
コンパイル時間 1,366 ms
コンパイル使用メモリ 157,936 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-17 19:29:37
合計ジャッジ時間 4,426 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 3 RE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define REP(i,N) for(int i=0;i<N;i++)
int main(){
	int N;
	int count=0;
	cin>>N;
	int A[N];
	int flag[N];
	REP(i,N){
		flag[i]=0;
	}
	REP(i,N){
		cin>>A[i];
		if(flag[A[i]-1]==0){
			count++;
		}else if(flag[A[i]-1]==1){
			count--;
		}
		flag[A[i]-1]++;
	}
	cout<<count<<endl;
	return 0;
}
0