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

연결되어있는 경로를 유니온 파인드를 이용해서 저장하고 여행 계획에 속한 도시들이 전부 이어져있으면 YES, 아니면 NO를 출력했다. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using int64 = long long; int n, m; vector parent; vector height; int GetParent(int n) { if (n == parent[n]) return n; return parent[n] = GetParent(parent[n]); ..
알고리즘
2022. 8. 7. 13:28