| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1351334 | trigon | Infinite Race (EGOI24_infiniterace2) | C++20 | 27 ms | 1980 KiB |
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> ahead(n,false);
int q;
cin >> q;
vector<int> ans(n,0);
int state=0;
while(q--){
int x;
cin >> x;
if(x>0){
if(ahead[x]==true) ans[x]++;
ahead[x]=true;
}
else{
ahead[-x]=false;
}
}
int res=0;
for(int i=0;i<n;i++){
res=max(ans[i],res);
}
cout<<res<<"\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... | ||||
