import java.io.*; import java.util.*; public class Main { static class Node implements Comparable { int index; long cost; public Node(int index, long cost) { this.index = index; this.cost = cost; } @Override public int compareTo(Node o) { return Long.compare(this.cost, o.cost); } } static int C, P, PB, PA1, PA2; static ArrayList[] graph; public static long dijkstra(int start, int end) { final lo..