結果

問題 No.182 新規性の虜
ユーザー tntan
提出日時 2015-12-04 20:56:42
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 98 ms / 5,000 ms
コード長 768 bytes
コンパイル時間 1,824 ms
コンパイル使用メモリ 95,460 KB
実行使用メモリ 8,272 KB
最終ジャッジ日時 2024-12-26 19:58:43
合計ジャッジ時間 4,178 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <cctype>
using namespace std;
typedef long long ll;

int main()
{
	int n, a;
	vector<int>v;
	set<int>s, t;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a;
		v.push_back(a);
		if (s.find(a) == s.end())s.insert(a);
		else t.insert(a);
	}
	int sum = 0;
	for (int i = 0; i < n; i++)
	{
		if (t.find(v[i]) == t.end())sum++;
	}
	cout << sum << endl;
	return 0;
}
0