結果

問題 No.182 新規性の虜
ユーザー hiyokko2
提出日時 2017-08-05 21:53:08
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 80 ms / 5,000 ms
コード長 491 bytes
コンパイル時間 1,566 ms
コンパイル使用メモリ 164,968 KB
実行使用メモリ 9,472 KB
最終ジャッジ日時 2024-12-27 19:04:15
合計ジャッジ時間 3,671 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++)
#define REP(i,n) FOR(i,0,n)
#define MOD 1000000007
#define int long long
using namespace std;
typedef long long ll;
typedef vector<vector<ll>> mat;
const int INF = 1e9;



signed main()
{
    int N;
    int A;
    map<int, int> cnt;

    cin >> N;
    int ans = 0;
    REP(i,N) {
        cin >> A;
        cnt[A]++;
        if (cnt[A] == 1) ans++;
        else if (cnt[A] == 2) ans--;
    }

    cout << ans << endl;
}
0