#BZOJ1468. Tree
Tree
No submission language available for this problem.
题目描述
给你一棵TREE,以及这棵树上边的距离.问有多少对点它们两者间的距离小于等于K
输入格式
N(n<=40000) 接下来n-1行边描述管道,按照题目中写的输入 接下来是k
输出格式
一行,有多少对点之间的距离小于等于k
7
1 6 13
6 3 9
3 5 7
4 1 3
2 4 20
4 7 2
10
5
No submission language available for this problem.
给你一棵TREE,以及这棵树上边的距离.问有多少对点它们两者间的距离小于等于K
N(n<=40000) 接下来n-1行边描述管道,按照题目中写的输入 接下来是k
一行,有多少对点之间的距离小于等于k
7
1 6 13
6 3 9
3 5 7
4 1 3
2 4 20
4 7 2
10
5
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.