摘要: 题目大意:n个点,m条边,开始血量为b,从1出发,要走到n,每条边有个扣血量,每个点有个价值,求在血量不为负走到第n个点时,走过的路径点权最大值最小. 最大值最小,很容易想到二分答案,由于血量是边权,我们可以跑最短路来保证他能走到终点,我们二分最大点权,在跑最短路时如果跑到比当前二分到的最大点权还大 阅读全文
posted @ 2018-08-05 16:41 Kaleidoscope233 阅读(182) 评论(0) 推荐(0) 编辑
摘要: A.HDU 1171 把和拆一半作容量然后跑背包。 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <cmath> 5 #include <cstring> 6 #include <queue> 阅读全文
posted @ 2018-08-05 07:53 Kaleidoscope233 阅读(139) 评论(0) 推荐(0) 编辑