随笔分类 -  数据结构 - 树的重心

摘要:Now Fox Ciel becomes a commander of Tree Land. Tree Land, like its name said, has n cities connected by n - 1 undirected roads, and for any two cities 阅读全文
posted @ 2018-02-28 09:27 楼主好菜啊 阅读(258) 评论(0) 推荐(0) 编辑
摘要:Give a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The min distance between node u and v. Give an i 阅读全文
posted @ 2018-02-27 22:54 楼主好菜啊 阅读(152) 评论(0) 推荐(0) 编辑
摘要:推荐博客:https://www.cnblogs.com/patrickzhou/p/5867208.html Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the t 阅读全文
posted @ 2018-02-26 23:03 楼主好菜啊 阅读(193) 评论(0) 推荐(0) 编辑
摘要:推荐博客 : http://blog.csdn.net/ZHangFFYY/article/details/77871897 我们对一个图的存储基本有两种,邻近矩阵和邻接表 ,在补充一个链式前向星 用此方法存图 , 首先先定义一个结构体数组 struct node { int to, w; // t 阅读全文
posted @ 2018-02-26 11:06 楼主好菜啊 阅读(173) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示