Submission #1099328

#TimeUsernameProblemLanguageResultExecution timeMemory
1099328dmn223Infinite Race (EGOI24_infiniterace2)C++17
0 / 100
85 ms10864 KiB
#include <bits/stdc++.h> using namespace std; map<int,int>m; int n, q, x, r; bool a[200001], b[200001]; int main() { cin >> n >> q; while(q--) { cin >> x; if(x > 0) { m[x]++; if(m[x] > 1) r++; } if(x < 0) { x = -x; if(m[x]) r++; m[x]--; } } cout << r; return 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...