2011年3月24日

hdu 1429 ( 胜利大逃亡(续) )

摘要: View Code http://acm.hdu.edu.cn/showproblem.php?pid=1429 1 Problem : 1429 ( 胜利大逃亡(续) ) Judge Status : Accepted 2 状态压缩+BFS 3 用二进制表示第i把钥匙的有无 比如已有第三把和第一把钥匙,则二进制表示为0000000101即整数5,用|添加钥匙 (如67行),用&判断有无某把钥匙(如53行) 4 #include<iostream> 5 #include<stdio.h> 6 #include<string> 7 #include&l 阅读全文
posted @ 2011-03-24 16:24 4.5.6 阅读(366) 评论(0) 推荐(0)