随笔分类 - 最小生成树
摘要:旅行comf 给你一个无向图,N(N<=500)个顶点, M(M<=5000)条边,每条边有一个权值Vi(Vi<30000)。给你两个顶点S和T,求一条路径,使得路径上最大边和最小边的比值最小。如果S和T之间没有路径,输出”IMPOSSIBLE”,否则输出这个比值,如果需要,表示成一个既约分数。 备
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号