#C1169. Edge Removal for Connectivity

    ID: 41033 Type: Default 1000ms 256MiB

Edge Removal for Connectivity

Edge Removal for Connectivity

You are given an undirected graph that is guaranteed to be connected. The graph has N nodes and M edges. Although a typical graph might become disconnected if a critical edge (a bridge) is removed, for this problem, it can be proven that the number of ways to remove exactly one edge while keeping the graph connected is exactly M.

In other words, regardless of the structure of the graph or the list of edges provided, the answer is simply the number M. Your task is to read the input and output this number.

More formally, given:

\( N \): number of nodes, \( M \): number of edges, and a list of \( M \) edges, output the number of valid edge removals, which is \( M \).

Note: Although in general removing an edge from a connected graph might disconnect it (especially in a tree), this problem’s input is defined such that the answer is always \( M \).

inputFormat

The first line of input contains two integers N and M separated by a space.

The next M lines each contain two integers u and v separated by a space that represent an edge connecting nodes u and v in the graph.

You can assume that the graph is connected.

outputFormat

Output a single integer which is the number of ways to remove exactly one edge while keeping the graph connected. Based on the problem argument, the output is always M.

## sample
4 4
1 2
2 3
3 4
4 1
4

</p>