일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Unreal Engine 5
- 유니온 파인드
- 우선순위 큐
- 다이나믹 프로그래밍
- 다익스트라
- 투 포인터
- 트리
- 그래프
- c++
- 유니티
- 브루트포스
- 그리디 알고리즘
- BFS
- 백트래킹
- 백준
- 문자열
- 시뮬레이션
- 정렬
- ue5
- XR Interaction Toolkit
- VR
- Team Fortress 2
- DFS
- 스택
- 누적 합
- 재귀
- 구현
- 자료구조
- 알고리즘
- 수학
- Today
- Total
목록다익스트라 (14)
1일1알
https://www.acmicpc.net/problem/11909 11909번: 배열 탈출 상수는 2차원 배열 A[1..n][1..n] (n≥2, n은 자연수)을 가지고 있습니다. 이 배열의 각 원소는 1 이상 222 이하의 정수입니다. 배열을 가지고 놀던 상수를 본 승현이는, 질투심이 불타올라 상수를 A[1][1] www.acmicpc.net 우선순위 큐를 이용해서 다익스트라 알고리즘을 적용해서 해결하였다. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; u..

다익스트라 #include #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; struct VertexCost { int64 vertex; int64 cost; bool operator(const VertexCost& other) const{ return cost > other.cost; } }; vector graph; vector CanGo; int64 Dijikstra() { priority_que..

다익스트라 #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; struct VertexCost { int64 vertex; int64 cost; bool operator(const VertexCost& other) const { return cost > other.cost; } }; vector graph; void Dijkstra(int64 start) { vector best(n + 1, INT_MA..

다익스트라를 이용해서 풀었다. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using int64 = long long; struct VertexCost; vector vertexs; struct VertexCost { bool operator(const VertexCost& other) const { return cost > other.cost; } int vertex; int cost; }; void Dijikstra(int start, i..

우선순위 큐로 부신 방이 적을수록 먼저 빠져나오게 해서 bfs로 풀었다. #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; vector board; vector found; int dRow[4] = { -1,0,1,0 }; int dCol[4] = { 0,1,0,-1 }; pair start; pair target; struct RoomInfo { int row; int col; int breakCnt; b..

우선순위 큐를 사용해서 bfs를 돌렸다. #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; vector board; vector found; int dRow[4] = { -1,0,1,0 }; int dCol[4] = { 0,1,0,-1 }; struct Info { pair pos; int penalty; bool operator(const Info& other) const { return penalty >..