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
- BFS
- 모던 JavaScript 튜토리얼
- 애드 혹
- 맵
- 누적 합
- 세그먼트 트리
- 구현
- 수학
- 트리
- 브루트포스
- 2357
- 투 포인터
- DP
- 정수론
- 13164
- 에라토스테네스의 체
- Python
- 슬라이딩 윈도우
- 정렬
- 그래프
- 이분 탐색
- 플로이드-워셜
- 그리디
- 해시 테이블
- JavaScript
- 문자열
- DFS
- boj
- 싸피
- SSAFY
Archives
- Today
- Total
목록9370 (1)
흙금이네 블로그

아이디어 다익스트라를 이용해 목적지 후보에 도착하는 최단 시간과 g와 h 교차로를 거쳐 도착하는 최단 시간을 비교한다. 풀이 import sys from heapq import heappush, heappop input = sys.stdin.readline INF = int(1e9) def solution(): T = int(input()) for _ in range(T): n, m, t = map(int, input().split()) s, g, h = map(int, input().split()) graph = [[] for _ in range(n+1)] for _ in range(m): a, b, d = map(int, input().split()) graph[a].append((b, d)) gra..
알고리즘
2023. 4. 6. 14:18