POJ 2411 Mondriaan's Dream
Time Limit: 3000MS | Memory Limit: 65536K | |
Total Submissions: 9938 | Accepted: 5750 |
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
Sample Output
Source
用0表示竖着放的木块的上半部分,单独的1表示竖着的木块的下半部分,两个连续的1表示横着放的木块.
最后一行铺满的状态就是全部为1
上下行的兼容性:
1:下面为0上面一定不能为0
2:下面为1.....如果上面为0,那么这是一个单独的1
如果上面为1,那么这应该是一个连续的1,检查下一位是否为1,及下一位的上面是否为1
#include <iostream>
#include <cstdio> #include <cstring> using namespace std; long long int dp[14][1<<14]; bool isfirst(int x) void getfirstline() bool isCool(int xia,int shang) |
* This source code was highlighted by YcdoiT. ( style: Codeblocks )
POJ 2411 Mondriaan's Dream的更多相关文章
- poj 2411 Mondriaan's Dream 【dp】
题目:id=2411" target="_blank">poj 2411 Mondriaan's Dream 题意:给出一个n*m的矩阵,让你用1*2的矩阵铺满,然 ...
- POJ 2411 Mondriaan's Dream (dp + 减少国家)
链接:http://poj.org/problem?id=2411 题意:题目描写叙述:用1*2 的矩形通过组合拼成大矩形.求拼成指定的大矩形有几种拼法. 參考博客:http://blog.csdn. ...
- 状压DP POJ 2411 Mondriaan'sDream
题目传送门 /* 题意:一个h*w的矩阵(1<=h,w<=11),只能放1*2的模块,问完全覆盖的不同放发有多少种? 状态压缩DP第一道:dp[i][j] 代表第i行的j状态下的种数(状态 ...
- 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)
一.Description Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, ...
- 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 Input The input contains several test cases. Each test case is mad ...
- poj 2411 Mondriaan's Dream(状态压缩dp)
Description Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, af ...
- poj 2411 Mondriaan's Dream 轮廓线dp
题目链接: http://poj.org/problem?id=2411 题目意思: 给一个n*m的矩形区域,将1*2和2*1的小矩形填满方格,问一共有多少种填法. 解题思路: 用轮廓线可以过. 对每 ...
随机推荐
- 请求servlet操作成功后,在JSP页面弹出提示框
应用环境: 点击前台页面,执行某些操作.后台action/servlet 执行后,返回处理结果(成功.失败.原因.状态等)信息.在前台jsp进行弹窗显示,alert(); 后台处理代码:(把要提示的数 ...
- Linux tcpdump 命令详解
简介用简单的话来定义tcpdump,就是:dump the traffic on a network,根据使用者的定义对网络上的数据包进行截获的包分析工具. tcpdump可以将网络中传送的数据包的& ...
- python函数(五)
函数 1.函数基本语法及特性 背景提要 现在老板让你写一个监控程序,监控服务器的系统状况,当cpu\memory\disk等指标的使用量超过阀值时即发邮件报警, 你掏空了所有的知识量,写出了以下代码 ...
- JS性能方面--内存管理及ECMAScript5 Object的新属性方法
Delete一个Object的属性会让此对象变慢(多耗费15倍的内存) var o = { x: 'y' }; delete o.x; //此时o会成一个慢对象 o.x; // var o = { x ...
- Microsoft SQL Server Management Studio ------------------------------ 附加数据库 对于 服务器
http://zhidao.baidu.com/link?url=didvEEY86Kap_F9PnRAJMGoLXv63IW1fhElfiOpkkmalJ9mvZoqNULlGKcGHN31y_4z ...
- O(1)快速乘注意事项
O(1)快速乘是经典玄学优化啦~由于刚挂了一次特此总结一番. ll mul(ll u,ll v){ return(u*v-ll((long double)u*v/p)*p+p)%p; } double ...
- wpf的毛边窗体效果 前台代码
<Window x:Class="wpfwindowsmove.毛边窗体" xmlns="http://schemas.microsoft.com/w ...
- uC/OS-II队列(OS_q)块
/*************************************************************************************************** ...
- winndows7、office2013 激活信息还原
windows7激活信息还原 1.现在“计算机”,右键中的“管理”中的“服务”中禁止Software Protection 2.还原路径C:\Windows\ServiceProfiles\Netwo ...
- Ajax异步刷新,测试用户名是否被注册
<body> <form name="form_register"> <input type="> <input type=&q ...