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 |
枚举加dij搜最短路从第一个人开始逐个枚举当这个人的等级是路线中最低等级时 需要的最短路 wa了一发忘记判断如果当前人等级和长老不和就直接continue的情况... 复杂度O(n^3) 还有广为流传的这组数据 答案应该是4000不是3950 0 5 10000 3 4 2 3000 3 2000 4 2000 5 9000 8000 2 3 3 5000 4 2000 5 7000 5000 4 0 2000 3 1 5 1900 50 2 0 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator