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 |
Tags
- 그리디 알고리즘
- VR
- 수학
- Unreal Engine 5
- 유니온 파인드
- 백트래킹
- 자료구조
- 유니티
- 정렬
- 문자열
- 누적 합
- 다익스트라
- 스택
- 우선순위 큐
- 다이나믹 프로그래밍
- 브루트포스
- 투 포인터
- DFS
- 시뮬레이션
- c++
- 알고리즘
- 재귀
- 구현
- BFS
- 백준
- 트리
- ue5
- XR Interaction Toolkit
- 그래프
- Team Fortress 2
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 |