| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1136212 | yoshi | Infinite Race (EGOI24_infiniterace2) | C++20 | 65 ms | 9796 KiB |
#include<bits/stdc++.h>
#define ll long long
using namespace std;
void uwu(){
ll n,q;
cin>>n>>q;
set<ll> a;
ll ans=0;
for(ll i=0; i<q; i++){
ll x;
cin>>x;
if(x>0){
if(a.count(x)==0){
a.insert(x);
}else{
a.clear();
a.insert(x);
ans++;
}
}else{
if(a.count(x*(-1))==1) a.erase(x);
}
}
cout<<ans<<"\n";
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
ll t=1;
//cin>>t;
while(t--){
uwu();
}
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
