結果

問題 No.182 新規性の虜
ユーザー weaken
提出日時 2020-10-14 04:04:16
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 434 bytes
コンパイル時間 1,920 ms
コンパイル使用メモリ 193,416 KB
最終ジャッジ日時 2025-01-15 07:12:55
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#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(1000000001, 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;
}
0