Problem D: 树上边被访问次数
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:13
Solved:5
Description
对树上的一些路径 (s1t1) (s2t2) (s3t3)… 进行访问,问边被访问的最多次数。
Input
第一行给出节点数N,访问的路劲数K。
接下N-1行,描述树上N-1条边。
再接下K行,每两个数字s,t表示一条s至t的路径。
Output
请输出边被访问的最多次数。
Sample Input Copy
5 10
3 4
1 5
4 2
5 4
5 4
5 4
3 5
4 3
4 3
1 3
3 5
5 4
1 5
3 4
Sample Output Copy
9
HINT
2<=N <= 5 x 104
1<=K<=105