[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 ...
随机推荐
- TCP/IP协议 模型
OSI的来源 OSI(Open System Interconnect),即开放式系统互联. 一般都叫OSI参考模型,是ISO(国际标准化组织)组织在1985年研究的网络互连模型. ISO为了更好的 ...
- python框架之Django(16)-接入Redis
准备 安装Redis 参考 Ubuntu 中 Redis 的安装与使用. 在python中使用Redis 参考 python 中使用 Redis . 安装依赖包 在 Django 中接入 Redis ...
- mysql数据库字符集相关操作(修改表字段编码,使其支持emoji表情)
普通的UTF8编码是不支持emoji表情插入的,会报异常: Caused by: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x9 ...
- [CSS] Frequently used method or solutions for issues
Stick button in right side in html Solution: //In the html <div class="float__button" & ...
- 2018-2019-2 20175211 实验一《Java开发环境的熟悉》实验报告
目录 代码托管 一.命令行下Java程序开发 二.IDEA下Java程序开发.调试 (1)建立与Git的链接 (2)开发.调试程序 (3)上传代码至码云 三.练习 四.问题及解决 五.学习总结 代码托 ...
- python_MySQL
原文章连接:http://www.runoob.com/python/python-mysql.html 配置数据库 conn = mysql.connector.connect(user='root ...
- java之搭建webservice服务端
1.新建工程. 2.配置项目名称和位置. 3.得到的项目结构如下: 4.配置tomcat服务器. (1) (2)新建一个tomcat服务. (3)配置tomcat参数. 5.配置WSDL文件. url ...
- 小程序canvas生成海报保存至手机相册
小程序canvas画图保存至手机相册 (1)可直接展示生成的海报 .因手机分辨率不同可能导致生成的海报会有细微差别,这里隐藏canvas海报,页面正常设置海报样式保存时保存隐藏的canvas海报 (2 ...
- java 43 接口
- 模块 import 与from
什么是模块:就是一系列功能的集合体 模块的来源 :1内置模块 2 第三方模块 3 自定义模块 模块的格式: 1 使用python编写的.py文件 2 已被编译为共享库或DLL的C或C++扩展 ...