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

작은거끼리 먼저 합칠수록 비교 횟수가 적어지기 때문에 우선순위 큐를 이용하여 제일 작은게 먼저 나오도록 해서 문제를 풀었다. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); priority_queue pq; int n; cin >> n; for (int i = 0; i < n; i++)..
알고리즘
2022. 6. 7. 12:42