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