Implement basic graph data structure and functions
•addEdge
•shortest path
•minimum spanning tree
•two color
Input starts with an integer n indicating the number of nodes in the graph, 0 <= n<= 2500.
Then, a set of m edges, 0<= m<=950000, and k command, 0<=0k<=30, are given.
The following four commands might appear multiple times (even interleaving) add, shortest_path, mst_weight, two_colorable.
Print the outputs of the given commands.
NTHU, DS, Data Structure, Homework, Graph.
http://140.114.86.238/problem/12063/
This one is a bitch. I fucked up everything. Still gets AC though.