文件名称:1
- 所属分类:
- 人工智能/神经网络/遗传算法
- 资源属性:
- [Text]
- 上传时间:
- 2018-08-27
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- q**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
给定一颗有权无根树,修改任意一条边,求最少的任意两点间的距离和:修改一条边是指删除树中的一条边,然后选择两个端点连线,形成一课新的树,并且不改变这条边的权值,在这棵树的基础上,求最少的任意两点间的距离和是多少
任意两点的距离和指:sum(a到b的距离,a<b,a和b都是树上的点)
输入:第一行是整数n,接下来n-1行,每行包括3个整数ai,bi,wi,表示节点ai与bi之间有一条权重为wi的边。
输出:最小的任意两点间的距离和
(Given a right to unrooted tree, modify any one side (you can not modify), the number of required minimum distance between any two points and is? Modify an edge means an edge to delete the tree, then the two endpoints of the connection, the formation of a new class of trees, and does not change the weight of this edge, in this tree, based on the minimum requirements of any two the distance between the points and how much distance between any two points and means: sum (a b distance, a <b,a和b都是树上的点)
输入:第一行是整数n,接下来n-1行,每行包括3个整数ai,bi,wi,表示节点ai与bi之间有一条权重为wi的边。
输出:最小的任意两点间的距离和)
任意两点的距离和指:sum(a到b的距离,a<b,a和b都是树上的点)
输入:第一行是整数n,接下来n-1行,每行包括3个整数ai,bi,wi,表示节点ai与bi之间有一条权重为wi的边。
输出:最小的任意两点间的距离和
(Given a right to unrooted tree, modify any one side (you can not modify), the number of required minimum distance between any two points and is? Modify an edge means an edge to delete the tree, then the two endpoints of the connection, the formation of a new class of trees, and does not change the weight of this edge, in this tree, based on the minimum requirements of any two the distance between the points and how much distance between any two points and means: sum (a b distance, a <b,a和b都是树上的点)
输入:第一行是整数n,接下来n-1行,每行包括3个整数ai,bi,wi,表示节点ai与bi之间有一条权重为wi的边。
输出:最小的任意两点间的距离和)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1.txt