結果

問題 No.182 新規性の虜
ユーザー HaarHaar
提出日時 2016-04-15 02:50:01
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 80 ms / 5,000 ms
コード長 384 bytes
コンパイル時間 584 ms
コンパイル使用メモリ 65,932 KB
実行使用メモリ 8,104 KB
最終ジャッジ日時 2023-08-27 10:37:28
合計ジャッジ時間 2,428 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 44 ms
5,840 KB
testcase_09 AC 80 ms
7,280 KB
testcase_10 AC 69 ms
6,768 KB
testcase_11 AC 53 ms
6,164 KB
testcase_12 AC 20 ms
4,804 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 36 ms
4,380 KB
testcase_19 AC 25 ms
4,380 KB
testcase_20 AC 17 ms
4,376 KB
testcase_21 AC 41 ms
4,376 KB
testcase_22 AC 21 ms
4,376 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 61 ms
8,104 KB
testcase_25 AC 15 ms
4,376 KB
testcase_26 AC 9 ms
4,380 KB
testcase_27 AC 2 ms
4,376 KB
evil01.txt AC 73 ms
8,168 KB
evil02.txt AC 72 ms
8,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <map>
using namespace std;

int main() {
	int n, a, cnt = 0;
	map<int, int> table;
	
	cin >> n;
	for(int i=0;i<n;++i){
		cin >> a;
		if(table.find(a) == table.end()){
			table[a] = 1;
		}else{
			++table[a];
		}
	}
	
	for(map<int, int>::iterator it=table.begin();it!=table.end();++it){
		if((*it).second == 1)++cnt;
	}
	cout << cnt << endl;
	
	return 0;
}
0