import java.util.*; public class Solution { class Node{ // 邻接点结构 int id, dist; //id表示节点编号,dist表示距离 public Node(){} public Node(int id, int dist){ this.id = id; this.dist = dist; } } int maxv = 0; List<Node>[] g; // 保存邻接点 ...