Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 문자열
- 백트래킹
- Team Fortress 2
- 백준
- 재귀
- 시뮬레이션
- 트리
- 그리디 알고리즘
- 자료구조
- VR
- 스택
- 수학
- 구현
- 누적 합
- 다익스트라
- 유니티
- 다이나믹 프로그래밍
- BFS
- 우선순위 큐
- DFS
- 그래프
- 투 포인터
- c++
- XR Interaction Toolkit
- 유니온 파인드
- 정렬
- Unreal Engine 5
- 알고리즘
- ue5
- 브루트포스
Archives
- Today
- Total
1일1알
백준 10867번 중복 빼고 정렬하기 C++ 본문

set 자료구조를 사용하였다.
#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <algorithm>
#include <utility>
#include <stack>
#include <queue>
#include <math.h>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>
using namespace std;
using ll = long long;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
set<int> s;
for (int i = 0; i < n; i++) {
int num;
cin >> num;
s.insert(num);
}
for (auto a : s) {
cout << a << " ";
}
};
'알고리즘' 카테고리의 다른 글
백준 10819번 차이를 최대로 C++ (0) | 2022.05.12 |
---|---|
백준 2417번 정수 제곱근 C++ (0) | 2022.05.11 |
백준 14890번 경사로 C++ (0) | 2022.05.09 |
백준 14499번 주사위 굴리기 C++ (0) | 2022.05.08 |
백준 1817번 짐 챙기는 숌 C++ (0) | 2022.05.06 |