标签:style http ar sp strong on 代码 ef line
通道:http://acm.hdu.edu.cn/showproblem.php?pid=3681
题意:机器人从F出发,走到G可以充电,D不能走进,走到Y关掉开关,要求把所有开关关掉,且电量最少,并求出初始最小电量。
思路:二分初始的电量,预处理任意G,Y,F之间的最短距离,然后状压dp[s][u]:状态为s的u为起点遍历整个图的最小布数。
代码:https://github.com/Mithril0rd/Rojo/blob/master/hdu3681.cpp
TAG:代码来自华仔
【状压+二分+BFS】HDU 3681 Prison Break
标签:style http ar sp strong on 代码 ef line
原文地址:http://www.cnblogs.com/Rojo/p/4090960.html