Adjacency list: for each node, list of (neighbor, weight).
typedef WeightedAdjacency = List<List<(int, double)>>;