[CF1000E] 最多必经 Boss 边 (We Need More Bosses)
Problem Statement
A game world consists of locations and bidirectional passages forming a simple connected undirected graph.
Choose a start location and an end location so as to maximize the number of passages that must be traversed on every path from to , and print this maximum number.
Input
The first line contains and (, ). The next lines each contain ().
Output
Print the maximum possible number of must-traverse passages.
Example
5 5
1 2
2 3
3 1
4 1
5 2
2
Note
- Constraints:,,图简单连通。
- Source:Codeforces 1000E · We Need More Bosses