結果
問題 | No.182 新規性の虜 |
ユーザー |
![]() |
提出日時 | 2015-04-17 10:44:31 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 77 ms / 5,000 ms |
コード長 | 682 bytes |
コンパイル時間 | 1,225 ms |
コンパイル使用メモリ | 88,896 KB |
実行使用メモリ | 8,064 KB |
最終ジャッジ日時 | 2024-12-26 18:55:57 |
合計ジャッジ時間 | 3,274 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
#include <algorithm> #include <vector> #include <cfloat> #include <string> #include <cmath> #include <set> #include <cstdlib> #include <map> #include <ctime> #include <iomanip> #include <functional> #include <deque> #include <iostream> #include <cstring> #include <queue> #include <cstdio> #include <stack> #include <climits> #include <sys/time.h> #include <cctype> using namespace std; typedef long long ll; int main() { int n; cin >> n; int ans = 0; map <int, int> memo; for (int i = 0; i < n; i++) { int x; cin >> x; memo[x]++; if (memo[x] == 1) { ans++; }else if (memo[x] == 2) { ans--; } } std::cout << ans << std::endl; }