2013年3月12日
摘要: 学了一下dij+heap用它做了做HDU2544遇到了两个问题:1.堆数组H开的太小会RE2.对于该题跑时15ms, 不加优化15ms,spfa跑时0ms探究:1.对于第一个问题:结点是会被重复加入的。因为每次松弛时,都会有结点加入堆,因此加入堆的结点总数会大于总的结点数。2.对于第二个问题,在网上找了找资料,迷茫中闪现一丝曙光。资料地址:http://blog.csdn.net/lyso1/article/details/5687180#include <stdio.h>#include <string.h>#include <stdlib.h>#defi 阅读全文
posted @ 2013-03-12 15:21 Still_Raining 阅读(814) 评论(0) 推荐(0)