- Time limit: 1.00 s
- Memory limit: 512 MB
Your task is to calculate the number of essential connections: if such a connection is removed from the network, it is not possible to send a message between some two computers.
The first input line contains an integer $n$: the number of computers. The computers are numbered $1,2,\ldots,n$.
After this, there are $n$ lines that describe the connections. Each line has two integers $a$ and $b$: there is a connection between computers $a$ and $b$.
There is at most one connection between two computers, and there are no connections from a computer to itself.
Print one integer: the number of essential connections.
Explanation: The essential connections are $(1,2)$, $(2,3)$, $(5,6)$ and $(6,7)$.
Subtask 1 (28 points)
- $2 \le n \le 100$
- $2 \le n \le 10^5$