Approach 정점에 cost가 있는 상황이므로, 위 문제와 거의 유사하다. https://viyoung.tistory.com/370 [백준 4485번] [Dijkstra] 녹색 옷 입은 애가 젤다지? Approach 전형적인 다익스트라 문제이다. DFS / BFS 문제처럼 상하좌우 방문해주면서 dist를 갱신해주면 된다. Code #include #define fastio cin.tie(0)->sync_with_stdio(0) using namespace std; typedef pair.. viyoung.tistory.com Code #include #define fastio cin.tie(0)->sync_with_stdio(0) using namespace std; typedef long long ..
[백준 1261번] [Dijkstra] 알고스팟
Approach 정점에 cost가 있는 상황이므로, 위 문제와 거의 유사하다. https://viyoung.tistory.com/370 [백준 4485번] [Dijkstra] 녹색 옷 입은 애가 젤다지? Approach 전형적인 다익스트라 문제이다. DFS / BFS 문제처럼 상하좌우 방문해주면서 dist를 갱신해주면 된다. Code #include #define fastio cin.tie(0)->sync_with_stdio(0) using namespace std; typedef pair.. viyoung.tistory.com Code #include #define fastio cin.tie(0)->sync_with_stdio(0) using namespace std; typedef long long ..
2022.01.12