| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1146288 | FZ_Laabidi | Infinite Race (EGOI24_infiniterace2) | C++20 | 75 ms | 11336 KiB |
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n, q;
vector<int> x;
signed main() {
cin >> n >> q;
x.resize(q);
set<int> people, val;
for (int i=0; i<q; i++) {
cin >> x[i];
people.insert(x[i]);
}
int count =0;
for (int i=0; i<q; i++) {
if (x[i] <0)
people.insert(x[i]);
if (x[i]>0) {
if (people.find(x[i])!=people.end())people.erase(x[i]);
else count++;
}
}
cout << count << endl;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
