| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1223682 | asli_bg | Infinite Race (EGOI24_infiniterace2) | C++20 | 32 ms | 1232 KiB |
#include<bits/stdc++.h>
using namespace std;
#define sp <<' '<<
#define FOR(i,a) for(int i=0;i<(a);i++)
#define FORE(i,a,b) for(int i=(a);i<(b);i++)
const int MAXN=2e5+5;
int say[MAXN];
signed main(){
int n,q;
cin>>n>>q;
int ans=0;
FOR(i,q){
int el;
cin>>el;
if(el<0){
el=-el;
say[el]--;
}
else say[el]++;
say[el]=max(0,say[el]);
//cout<<"here" sp el sp say[el]<<endl;
ans=max(ans,say[el]-1);
}
cout<<ans<<endl;
}| # | 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... | ||||
