最近在刷巨巨们放出来的专题,然后没做几题就卡住了,果然还是太弱了T U T... 这次做到了一题01分数规划求解的生成树问题。 题目大意是这样的:给你一个无向完全图,每条边i都有两个权值,长度a[ i ],花费b[ i ],需要选出其中的一些边构造一颗生成树,生成树需要满足条件:∑ b [ i ] / ∑ a [ i ]最小。 这样我还是先来介绍一下01分数规划吧~ 给定一个上述的问
题目: David the Great has just become the king of a desert country. To win the respect of his people, he decided to build channels all over his country to bring water to every village. Villages which a