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
For each test case, output the number of different ways the given rectangle can be filled with small rectangles of size 2 times 1. Assume the given large rectangle is oriented, i.e. count symmetrical tilings multiple times.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的小矩形填满方格,问一共有多少种填法. 解题思路: 用轮廓线可以过. 对每 ...
随机推荐
- python字符串格式化输出
python格式化输出 python格式化输出有两种方式:百分号和format format的功能要比百分号方式强大,其中format独有的可以自定义字符填充空白.字符串居中显示.转换二进制.整数自动 ...
- 关于git不区分文件名大小写的处理
今天遇到了git不区分文件名大小写的问题,一开始着实郁闷了一把. 处理办法: windows下在git中修改文件的大小写 git mv --force myfile MyFile 或者 git mv ...
- git实习笔记
一.查找文件目录 二.添加上传文件 三.提交文件,描述信息 四.登录
- POJ 1236 Network of Schools(强连通分量/Tarjan缩点)
传送门 Description A number of schools are connected to a computer network. Agreements have been develo ...
- 【Alpha版本】冲刺-Day7
队伍:606notconnected 会议时间:11月15日 会议总结 张斯巍(433) 今天安排:上传界面设计 完成度:95% 明天计划:回收站界面设计 遇到的问题:无 感想:从一开始界面风格就要确 ...
- nginx 伪静态
伪静态是一种可以把文件后缀改成任何可能的一种方法,如果我想把php文件伪静态成html文件,这种相当简单的,下面来介绍nginx 伪静态配置方法有需要了解的朋友可参考 nginx只需要打开nginx. ...
- Objective-C学习笔记类目、协议
不是所有的方法都可以被覆盖的!比如:intValue就不能被覆盖!! 原因正在查找中! 别人的电脑上却可以! 类目.h件 #import <Foundation/Foundation.h> ...
- js004-变量、作用域和内存问题
js004-变量.作用域和内存问题 4.1 基本类型和引用类型的值 基本类型:简单的数据段 引用类型:可能由多个值构成的对象 五种基本数据类型:undefined.null.boolean.Numbe ...
- SQL Server Transact-SQL 编程
T-SQL语句用于管理SQL Server数据库引擎实例,创建和管理数据库对象,以及查询.插入.修改和删除数据. Ø 变量 . 局部变量(Local Variable) 局部变量是用户可以自定义的变量 ...
- 模拟退火解决TSP问题
// monituihuo.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <stdio.h> #includ ...