結果

問題 No.182 新規性の虜
ユーザー ant2357
提出日時 2016-04-22 14:04:26
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 102 ms / 5,000 ms
コード長 430 bytes
コンパイル時間 1,206 ms
コンパイル使用メモリ 87,808 KB
実行使用メモリ 8,320 KB
最終ジャッジ日時 2024-12-27 03:02:11
合計ジャッジ時間 3,196 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <algorithm>

using namespace std;

int main() {
	int n;
	cin >> n;

	vector<int>a(n);
	map<int, int>aMap;

	for (int i = 0; i < n; i++) {
		cin >> a[i];
		aMap[a[i]]++;
	}

	int ans = 0;

	for (map<int, int>::iterator it = aMap.begin(); it != aMap.end(); ++it) {
		if ((*it).second == 1) ans++;
	}

	cout << ans << endl;
	return 0;
}
0