[백준] 1238번 파티
import heapq import sys input = sys.stdin.readline INF = int(1e9) n, m, x = map(int, input().split()) graph = [[] for _ in range(n+1)] for _ in range(m): a, b, c = map(int, input().split()) graph[a].append((b,c)) def dijkstra(start): distance = [INF] * (n+1) distance[start] = 0 q = [] heapq.heappush(q, (0, start)) while q: cost, dest = heapq.heappop(q) if distance[dest] < cost: continue for d, c..
코딩테스트 대비
2022. 3. 7. 18:36
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- pytorch
- error
- 백준
- 코딩테스트
- torch
- 설치하기
- 다익스트라
- torchscript
- 이것이코딩테스트다
- LGSVL
- PIP
- BFS
- tensorflow
- 카카오
- version
- Python
- notfound
- 동적프로그래밍
- 파이썬
- dfs
- 백트래킹
- CUDA
- 설치
- numpy
- 프로그래머스
- shellscript
- n과m
- docker
- 최소신장트리
- matplotlib
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함