题目描述
Problem Description
The leader of SHOI has decided to establish a local area network in the training room for easier communication among participants. Currently, there are $n$ computer terminals in the room, and the leader has used $m$ network cables to connect these computers, allowing bidirectional communication between any two connected computers. The network is currently connected, meaning any two computers can communicate directly or indirectly.
To ensure that all students can communicate through this computer network during the preparation period, the leader wants to know: "If a computer $\texttt{A}$ shuts down due to a fault and a network cable $\texttt{L}$ (not connected to $\texttt{A}$) is cut, can the remaining computers, excluding $\texttt{A}$, still communicate with each other?"
Therefore, the leader needs you to calculate the "instability degree" of this local area network. The instability degree is the total number of different schemes that can make the network disconnected by removing one computer and cutting one network cable (this cable is not connected to the removed computer).
Input Format
The first line of the input file contains two positive integers $n$ and $m$, representing the number of computer terminals and the number of network cables used to connect the computers, respectively.
The next $m$ lines each contain two integers $x$ and $y$, describing a network cable that connects the computers numbered $x$ and $y$, with $x$ not equal to $y$.
The input file guarantees that the computer network is initially connected.
Output Format
The output file contains only one line with a single integer, which is the total number of different schemes that can make the network disconnected by removing one computer and cutting one network cable.
Sample Input and Output
Sample Input #1
5 4
1 2
1 3
1 4
1 5
Sample Output #1
12
Sample Input #2
5 7
1 2
1 3
1 4
2 3
2 4
5 3
5 4
Sample Output #2
2
Sample Input #3
4 6
1 2
2 3
2 3
3 4
4 1
4 1
Sample Output #3
4
Notes
- $1 \leq n \leq 2 \times 10^3$;
- $1 \leq m \leq 2 \times 10^5$.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分