| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1097110 | Trisanu_Das | Infinite Race (EGOI24_infiniterace2) | C++17 | 16 ms | 3164 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
int v[200005];
signed main(){
ios_base::sync_with_stdio(0); cin.tie(0);
int m, n; cin >> m >> n;
int mx = 0;
while(n--){
int x; cin >> x;
if(x){
if(v[x] == mx) v[x] = ++mx;
else v[x] = mx;
}else if(v[-x] != 0) --v[-x];
}
cout << max(mx - 1ll, 0ll) << '\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... | ||||
