摘要: 不能处理有环的图void SPFA(){ memset(vis, false, sizeof(vis)); vis[1] = true; for(int i = 1; i d[u] + w){ d[v] = d[u] + w; ... 阅读全文
posted @ 2015-08-26 16:26 Painting、时光 阅读(103) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5294SPFA:Bellman_Ford的队列优化算法无法处理带负环的图复杂度O(kE) k #include #include #include #include #include #include #inclu... 阅读全文
posted @ 2015-08-26 16:17 Painting、时光 阅读(160) 评论(0) 推荐(0) 编辑
摘要: java语言的三个特征封装,继承,以及多态多态的概念:一个对象能被多个类(必须有继承关系)所定义Cat cat = new Animal也能Cat cat = new CatAniamal 是 Cat 的父类 class Cat extends Animal这里就有个区分对于非静态量,编译看左边这个... 阅读全文
posted @ 2015-08-26 10:12 Painting、时光 阅读(102) 评论(0) 推荐(0) 编辑