| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1187958 | esomer | Infinite Race (EGOI24_infiniterace2) | C++20 | 66 ms | 9800 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int N, Q; cin >> N >> Q;
set<int> passed;
int ans = 0;
while (Q--) {
int x; cin >> x;
if (x < 0) passed.erase(-x);
else {
if (passed.count(x)) {
passed.clear();
passed.insert(x);
ans++;
}else passed.insert(x);
}
}
cout << ans << "\n";
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
