제출 #1135213

#제출 시각아이디문제언어결과실행 시간메모리
1135213MunkhturErdenebatInfinite Race (EGOI24_infiniterace2)C++20
100 / 100
133 ms16012 KiB
#include<bits/stdc++.h> #include<string.h> #include <algorithm> #include <stdlib.h> #define ll long long using namespace std; ll k[500006],a,b,c,d,e,f,m,i,j,n,h,g,l,r,ka,p,q[200005],t[200005]; map<ll,ll> maa,mii,mee; vector<ll> vas[25],vis,vii; int main(){ cin>>a; cin>>b; k[0]=0; for(i=1 ; i<=b ; i++){ cin>>t[i]; if(k[i-1]>k[maa[abs(t[i])]] || maa[abs(t[i])]==0 || t[maa[abs(t[i])]]!=t[i] || t[i]<0){ k[i]=k[i-1]; } else{ k[i]=k[i-1]+1; } maa[abs(t[i])]=i; } cout<<k[b]; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...