https://www.acmicpc.net/problem/1197 import sysimport heapqv,e = map(int, input().split(" "))graph = [[] for _ in range(v + 1)]for _ in range(e): start, end, score = map(int, sys.stdin.readline().split()) graph[start].append([score, end]) graph[end].append([score, start])visit = [-1 for i in range(v+1)]h = [[0, 1]]answer = 0while h: next = heapq.heappop(h) if visit[next[1]] != -1:..