제출 #1126241

#제출 시각아이디문제언어결과실행 시간메모리
1126241william889Infinite Race (EGOI24_infiniterace2)C++20
100 / 100
56 ms1196 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...