# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1126245 | william889 | Infinite Race (EGOI24_infiniterace2) | C++20 | 53 ms | 1196 KiB |
# include<bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin>>n>>m;
vector<int>v(n,-1);
int t=0;
for(int i=0;i<m;i++){
int k;
cin>>k;
if(k>0){
if(v[k]==t){
t++;
v[k]=t;
}
else{
v[k]=t;
}
}
else{
v[-1*k]=-1;
}
}
cout<<t;
}
# | 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... |