Trees · Matrix Tree Theorem (Optional)
Lesson 12
Programming problem. Given a list of edges of an undirected graph \(G(V,E)\), where \(V=\{0,1,\dotsc,9\}\), find the number of its spanning trees.
Public samples
Input
0 1 0 5 0 6 1 5 1 6 2 5 2 7 3 4 3 9 4 7 4 9 6 8 7 8
Expected output
120