Implement prototype(n: int, edges: list[tuple[int, int, int]]) -> list[list[int | None]] and solve with the same signature. Vertices are 0..n-1. Edges are directed and integer-weighted. Return an n-by-n minimum-cost matrix in vertex-index order, using None for unreachable pairs and zero diagonal when no negative cycle exists. Keep the cheapest parallel edge. n=0 returns [].
Example: (3, [(0,1,3),(1,2,2),(0,2,9)]) returns [[0,3,5],[None,0,2],[None,None,0]].
Raise ValueError for negative n, invalid endpoints, or any negative cycle. Prototype: run Bellman–Ford from each vertex and collect its distance row; propagate any negative-cycle error. Final: use Floyd–Warshall in O(V³) time and O(V²) space. Preserve inputs, including on failure.
Complete the starter code, then run the checks.
Results and errors will appear here.