状压dp
附魔兔子
这个作者很懒,什么都没留下…
展开
-
HDU - 1565 方格取数(1)【轮廓线dp】
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1565思路:能放的情况,(左边格子没有取或者是第一列)&&(上面格子没有取)。也就是上一个状态的二进制最左边一位(代表正上方)和最右边一位(代表左方)都为0代码:#include<cstdio>#include<cmath>#include<...原创 2018-11-21 15:42:03 · 210 阅读 · 0 评论 -
poj2411 Mondriaan's Dream【轮廓线dp】
传送门:http://poj.org/problem?id=2411思路:分成当前格①不放②左放③上放三种情况转移 当前状态是从当前格子上面开始计的,不是从左到右,是先从上到下再从左到右。代码:#include<cstdio>#include<cmath>#include<algorithm>#include<cstring>...原创 2018-11-19 21:03:47 · 182 阅读 · 0 评论 -
hdu1693 Eat the Trees【轮廓线dp】
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1693代码:#include<cstdio>#include<cmath>#include<algorithm>#include<cstring>#include<string>#include<iostream>...原创 2018-11-19 21:06:14 · 93 阅读 · 0 评论 -
POJ 3311 Hie with the Pie【floyd+状压dp】
传送门:http://poj.org/problem?id=3311代码:#include<cstdio>#include<cmath>#include<algorithm>#include<cstring>#include<string>#include<iostream>#include<map...原创 2018-11-19 21:07:24 · 98 阅读 · 0 评论 -
Gym 101161H Witcher Potion 【状压dp】
题意:勇者去打怪兽,有两个值,一个是能量条,初始100,debuff毒素条,一开始0。每个样例的第一行是打一个怪兽需要的能量和时间。第二行是勇者带的药的瓶数。接下来一行给的是每瓶药可以加的能量,然后一行是每瓶药会增加的毒素值。每次打完怪,勇者可以喝最多一瓶药,或者不喝。当勇者能量<=打怪需要的能量的时候,就不能开怪了,不能开怪就结束了,还有毒素,超过100他也死了。打怪的时候,过多少时间,-...原创 2019-03-13 23:10:13 · 331 阅读 · 0 评论