結果
問題 | No.182 新規性の虜 |
ユーザー |
![]() |
提出日時 | 2015-07-17 21:49:57 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 61 ms / 5,000 ms |
コード長 | 918 bytes |
コンパイル時間 | 2,057 ms |
コンパイル使用メモリ | 91,020 KB |
実行使用メモリ | 8,064 KB |
最終ジャッジ日時 | 2024-12-26 19:28:57 |
合計ジャッジ時間 | 2,785 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
#include <cstdio> #include <cstring> #include <cmath> #include <climits> #include <iostream> #include <iomanip> #include <list> #include <stack> #include <queue> #include <vector> #include <map> #include <set> #include <string> #include <utility> #include <algorithm> #include <numeric> #include <functional> #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define ALL(a) (a).begin(),(a).end() using namespace std; typedef long long ll; int main(int argc, char *argv[]) { cin.tie(0); ios::sync_with_stdio(false); int N, a; set<int> s, dup; cin >> N; REP(i, N) { cin >> a; if (s.find(a) != s.end()) dup.insert(a); s.insert(a); } int ans = 0; for (auto x: s) if (dup.find(x) == dup.end()) ans++; cout << ans << endl; return 0; }