| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1358561 | hsuan._.0528 | Infinite Race (EGOI24_infiniterace2) | C++20 | 37 ms | 460 KiB |
#include<bits/stdc++.h>
using namespace std;
#define LL long long
const int maxn = 2e5+10;
int n, q, ans=0;
bitset<maxn> a; // 0 i在前面 / 1 i在後面
signed main(){
ios_base::sync_with_stdio(0); cin.tie(0);
cin>>n>>q;
while(q--){
int x; cin>>x;
if(x<0){
x*=-1;
a[x]=0;
}else{
if(a[x]==1){
ans++;
a.reset();
}
a[x]=1;
}
}
cout<<ans;
return 0;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
