re,怎么写
查看原帖
re,怎么写
1189340
aishiteru_mitsu_ha楼主2024/1/16 18:25
#include<bits/stdc++.h>
using namespace std;
bool a[100000];
int n,maxx=-1000000,cnt;
int main(){
    cin>>n;
    for(int i=1;i<=n;i++){
        int j;
        cin>>j;
        maxx=max(maxx,j);
        if(a[j]==false){
            a[j]=true;
            cnt++;
        }else{
            a[j]=false;
            cnt--;
        }
    }
    cout<<cnt<<endl;
    return 0;
}
2024/1/16 18:25
加载中...