SP14935 CAC - Cactus
Description
In the mathematical field of graph theory, a spanning tree T of a connected, undirected graph
Input Format
The first line of input will be the number of test cases. Each test case will start with a two numbers N and E where N is the number of vertices of the cactus graph, vertices are numbered from 1 to N, 3
Output Format
For each test case print “Case C: X” without quotes where C is the case number starting with 1 and X is the number of ways you can convert the given cactus graph to a spanning tree.