| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1354826 | Gurban | Infinite Race (EGOI24_infiniterace2) | C++20 | 50 ms | 9776 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n,q;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cin >> n >> q;
set<int>overt;
int ans = 0;
while(q--){
int x; cin >> x;
if(x > 0){
if(overt.find(x) != overt.end()){
ans++;
overt.clear();
}
overt.insert(x);
}
else {
x *= -1;
if(overt.find(x) != overt.end()) overt.erase(x);
}
}
cout<<ans;
}| # | 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... | ||||
