随笔分类 -  最小生成树

摘要:旅行comf 给你一个无向图,N(N<=500)个顶点, M(M<=5000)条边,每条边有一个权值Vi(Vi<30000)。给你两个顶点S和T,求一条路径,使得路径上最大边和最小边的比值最小。如果S和T之间没有路径,输出”IMPOSSIBLE”,否则输出这个比值,如果需要,表示成一个既约分数。 备 阅读全文
posted @ 2018-11-16 00:42 suvvm 阅读(306) 评论(0) 推荐(0)
摘要:Destroy Walls Long times ago, there are beautiful historic walls in the city. These walls divide the city into many parts of area. Since it was not co 阅读全文
posted @ 2018-11-14 23:52 suvvm 阅读(415) 评论(0) 推荐(0)
摘要:Constructing Roads There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to e 阅读全文
posted @ 2018-11-12 23:05 suvvm 阅读(431) 评论(0) 推荐(0)