結果

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

ソースコード

diff #

#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 a;
    cin >> a;
    memo[a]++;
    if (memo[a] == 1) {
      ans++;
    }else if (memo[a] == 2){
      ans--;
    }
  }

  std::cout << ans << std::endl;
}
0