[poj P2411] Mondriaan's Dream
[poj P2411] Mondriaan's Dream
Time Limit: 3000MS | Memory Limit: 65536K | |
Total Submissions: 18023 | Accepted: 10327 |
Description
Expert as he was in this material, he saw at a glance that he'll need a computer to calculate the number of ways to fill the large rectangle whose dimensions were integer values, as well. Help him, so that his dream won't turn into a nightmare!
Input
Output
Sample Input
1 2 1 3 1 4 2 2 2 3 2 4 2 11 4 11 0 0
Sample Output
1 0 1 2 3 5 144 51205
Source
#include<cstdio> #include<cstring> #include<algorithm> #include<vector> #define LL long long #define idx(x,i) ((x>>i)&1) using namespace std; ; <<lim]; vector <<<lim]; bool jug(int su,int sd) { ; i<m; i++) { int ku=idx(su,i),kd=idx(sd,i); if (!kd&&ku) continue; ; else if (!kd) { &&!idx(su,i+)) su|=<<(i+); ; } } ; } int main() { while (scanf("%d%d",&n,&m),n|m) { S=<<m; ; i<S; i++) o[i].clear(); ; i<S; i++) ; j<S; j++) if (jug(i,j)) o[j].push_back(i); memset(f,,][]=; ; i<=n; i++) ; j<S; j++) ,s=o[j].size(); k<s; k++) f[i][j]+=f[i-][o[j][k]]; printf(]); } ; }
[poj P2411] Mondriaan's Dream的更多相关文章
- PKU P2411 Mondriaan's Dream
PKU P2411 Mondriaan's Dream 题目描述: Squares and rectangles fascinated the famous Dutch painter Piet Mo ...
- POJ 2411 Mondriaan's Dream -- 状压DP
题目:Mondriaan's Dream 链接:http://poj.org/problem?id=2411 题意:用 1*2 的瓷砖去填 n*m 的地板,问有多少种填法. 思路: 很久很久以前便做过 ...
- POJ 2411 Mondriaan's Dream 插头dp
题目链接: http://poj.org/problem?id=2411 Mondriaan's Dream Time Limit: 3000MSMemory Limit: 65536K 问题描述 S ...
- POJ - 2411 Mondriaan's Dream(轮廓线dp)
Mondriaan's Dream Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One nig ...
- [POJ] 2411 Mondriaan's Dream
Mondriaan's Dream Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 18903 Accepted: 10779 D ...
- [poj 2411]Mondriaan's Dream (状压dp)
Mondriaan's Dream Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 18903 Accepted: 10779 D ...
- Poj 2411 Mondriaan's Dream(状压DP)
Mondriaan's Dream Time Limit: 3000MS Memory Limit: 65536K Description Squares and rectangles fascina ...
- Poj 2411 Mondriaan's Dream(压缩矩阵DP)
一.Description Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, ...
- poj 2411 Mondriaan's Dream(状态压缩dp)
Description Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, af ...
随机推荐
- [js]js杂项陆续补充中...
hasOwnProperty判断对象是否有这个属性 p = { 'name': 'maotai', 'age': 22 }; console.log(p.hasOwnProperty('names') ...
- Cocos Creator 使用计时器(官方文档摘录)
在 Cocos Creator 中,我们为组件提供了方便的计时器,这个计时器源自于 Cocos2d-x 中的 cc.Scheduler,我们将它保留在了 Cocos Creator 中并适配了基于组件 ...
- PHP on CentOS (LAMP) and wordpress
http://php.net/manual/zh/install.windows.php https://www.unixmen.com/install-wordpress-centos-7-linu ...
- angularjs 绑定多个属性到下拉框
绑定下拉框 angularjs 代码: //活动下拉切换 $scope.activityChange = function () { var cards = new Array(); var url ...
- Windbg程序调试系列1-Mex扩展使用总结
最近一直在频繁使用Windbg做线上Dump调试,与微软做Case交流的时候,发现微软CSS团队,用了一个非常效率的Windbg 插件,Mex: 使用介绍: https://blogs.msdn.mi ...
- webstorm中使用sass
最近由原来的sublime转为使用webstorm,用的不是很熟.我们在webstorm中使用sass 1.首先sass是基于ruby的.这个时候我们需要安装ruby. 2.安装成功后.我们需要去掉原 ...
- js语言精粹
1.typeof null == “object” ,所以不能通过typeof ~ == "object",判断为对象 : a.判断为null的,直接~ === null:b. ...
- CSS中一个冒号和两个冒号有什么区别
一个冒号是伪类,两个冒号是伪元素 伪类可以独立于文档的元素来分配样式,且可以分配给任何元素,逻辑上和功能上类类似,但是其是预定义的.不存在于文档树中且表达方式也不同,所以叫伪类.伪元素所控制的内容和一 ...
- u-boot2010.06移植阶段三--norflash驱动
2011-03-20 23:06:24 学习笔记: 效果图: 参考步骤: 一,把smdk2410 # 改成apple2440 # 1,在board/samsung/apple2440/apple24 ...
- 20190402Linux高级命令进阶(week1_day2
Linux高级命令进阶(week1_day2) 输出重定向 场景:一般命令的输出都会显示在终端中,有些时候需要将一些命令的执行结果想要保存到文件中进行后续的分析/统计,则这时候需要使用到的输出重定向技 ...