Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
郁闷哦,用prim过了不过有个小细节啊!wa了几次。第一次是把从1出发的最小变加进去而不是所有边中最小边加进去,然后求最大生成树的最小边,还有个问题就是,一旦n节点一进入树马上就return,否则求出来的就可能不是满足题意的值了。 2485是最小生成树的最大边,1797是最小生成树的最小边。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator