#Lutece2709. 蜘蛛的网
蜘蛛的网
Migrated from Lutece 2709 蜘蛛的网
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
众所周知,蜘蛛是一种擅长织网的生物。
然而,其编织的网常常因为莫名原因遭到破坏,因此他不得不重新修补他的网。
蜘蛛的网可以看作一个有 个点 条边的无向联通图,对于每次修补,蜘蛛实际上可以只把被破坏的部分拆开再重新织被破坏的部分就可以完成修补。
因此对于蜘蛛来说,他想知道他至少需要拆开多少条边,使得蛛网不再联通,这样他才可以完成修补。
Input
第一行两个正整数 含义如题所示。
接下来 行,每行两个正整数 ,表示 和 之间有一条无向边。
输入数据保证合法且无自环。
Output
输出共一行,即为最少需要断掉的边
Samples
10 20
1 2
2 3
1 4
3 5
2 6
5 7
5 8
1 9
5 10
7 8
2 6
5 4
4 9
1 4
10 6
8 10
3 5
5 10
7 3
8 6
2
Constraints
Resources
2022 UESTC ICPC Training for Graph