#372. 树
树
Sample Input
input1:
4 1
1 2
2 3
3 4
2 4
input2:
7 2
1 2
1 3
4 2
2 5
6 5
5 7
1 7
2 6
input3:
4 3
1 2
1 3
1 4
2 3
2 4
3 4
Sample Output
output1:
4
output2:
8
output3:
0
Related
In following contests:
Sample Input
input1:
4 1
1 2
2 3
3 4
2 4
input2:
7 2
1 2
1 3
4 2
2 5
6 5
5 7
1 7
2 6
input3:
4 3
1 2
1 3
1 4
2 3
2 4
3 4
Sample Output
output1:
4
output2:
8
output3:
0
In following contests:
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.