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的小矩形填满方格,问一共有多少种填法. 解题思路: 用轮廓线可以过. 对每 ...
随机推荐
- POJ 2457 Part Acquisition
第一反应是BFS,比较直观,但是输出路径写的不是很熟练,此外,习惯不好,“==”写成了“=”,所以常量一定放前面! #include <cstdio> #include <queue ...
- GNU CMAKE 笔记
最近在调试OJ, 忙了4天多, 最后的问题是judge模块不能正常工作. judge 模块就是两个C++源文件, 它的工作是 从数据库获取用户提交的源码 测评 将测评结果写到数据库 测评部分是与数据库 ...
- [Android]加密技术
对称加密无论是加密还是解密都使用同一个key,而非对称加密需要两个key(public key和private key).使用public key对数据进行加密,必须使用private key对数据进 ...
- Django TemplateSyntaxError Could not parse the remainder: '()'
返回的数据是列表集合,如 n [5]: a = set() In [6]: a.add((1, 3)) In [7]: a Out[7]: {(1, 3)} 在模板中使用方式如下: {% for ar ...
- elk系列3之通过json格式采集Nginx日志
preface 公司采用的LNMP平台,跑着挺多nginx,所以可以利用elk好好分析nginx的日志.下面就聊聊它吧. 下面的所有操作都在linux-node2上操作 安装Nginx nginx是开 ...
- gcc编译与gdb调试简要步骤
http://blog.chinaunix.net/uid-24103300-id-108248.html 一.Linux程序gcc编译步骤: Gcc编译过程主要的4个阶段: l 预处理阶段,完成宏定 ...
- 什么是xmlschema
XML Schema定义(XML Schema Definition,XSD)是一套W3C标准,用于基于XML的称为XML Schema的类型系统.用于定义的语言是一种称为XML模式定义语言(XML ...
- HashMap与ArrayList互相嵌套的代码实现
HashMap嵌套ArrayList的代码实现 结果要求为 三国演义 吕布 周瑜笑傲江湖 令狐冲 林平之神雕侠侣 ...
- C#------如何获取本机IP地址
转载: http://www.narkii.com/club/thread-396944-1.html 代码: private string GetIpAddress() { string hostN ...
- 20145212 《Java程序设计》第5周学习总结
20145212 <Java程序设计>第5周学习总结 教材学习内容总结 第八章 1.Java中所有错误都会被打包为对象,通过try和catch语法可以对代表错误的对象做处理. try{ . ...