Submission #1119679

#TimeUsernameProblemLanguageResultExecution timeMemory
1119679ezzzayInfinite Race (EGOI24_infiniterace2)C++14
0 / 100
18 ms684 KiB
#include<bits/stdc++.h> using namespace std; #define itn long long #define int long long #define ff first #define ss second #define pb push_back map<int,int>mp; map<int,int>urd; signed main(){ int n,q; cin>>n>>q; for(int i=0;i<n;i++)mp[i]=-1; while(q--){ int x; cin>>x; if(x<0){ x*=-1; if(urd[x]){ mp[x]++; } urd[x]=1; } else{ if(urd[x]==0){ mp[0]++; } urd[x]=0; } } cout<<mp[0]; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...