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 |
OLE了,问一下开始没想到是最小生成树,我从小开始枚举最大边的值,然后把小于等于枚举值的边全加进去,再判连通,如果连通就可以了,把这些边输出来,我加了优化,判连通也是用并查集,超时是不超了,可是OLE,可能是因为要形成一个连通图不需要所有小于最大边的边,所以判我输出太多了,可是我觉得这个是SPJ,我的解应该也是正确的呀 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator