結果
問題 |
No.182 新規性の虜
|
ユーザー |
![]() |
提出日時 | 2020-10-14 04:02:15 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 429 bytes |
コンパイル時間 | 1,779 ms |
コンパイル使用メモリ | 194,136 KB |
最終ジャッジ日時 | 2025-01-15 07:12:32 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 RE * 13 |
ソースコード
#include <bits/stdc++.h> #define fastIO (cin.tie(0), cout.tie(0), ios::sync_with_stdio(false)) using namespace std; int main() { fastIO; int n; cin >> n; vector<int> A(n + 1, 0); int cnt = 0; for (int i = 0; i < n; ++i) { int num; cin >> num; if (A[num] == 0) { A[num] = 1; cnt++; } else if (A[num] == 1) { A[num] = -1; cnt--; } } cout << cnt << '\n'; return 0; }