zl程序教程

您现在的位置是:首页 >  其它

当前栏目

【AtCoder Beginner Contest 073 C】Write and Erase

and Write Contest Atcoder
2023-09-14 09:03:49 时间

【链接】h在这里写链接


【题意】


在这里写题意

【题解】


在这里写题解

【错的次数】


0

【反思】


在这了写反思

【代码】

#include <bits/stdc++.h>
using namespace std;

const int N = 1e5;

map <int, int> dic;
int tot = 0;

int main() {
    //freopen("F:\\rush.txt", "r", stdin);
    ios::sync_with_stdio(0);
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        int x;
        cin >> x;
        dic[x] = 1 - dic[x];
        if (dic[x] & 1)
            tot++;
        else
            tot--;
    }
    cout << tot << endl;
    return 0;
}