[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 ...
随机推荐
- .net core使用ef core操作mysql数据库
新建.net core webapi项目 在NuGet包管理器中搜索 MySql.Data.EntityFrameworkCore并安装,安装的8.0.14版本,只安装这一个就够了 安装后创建Data ...
- Mac破解免费office软件
一.下载安装包及破解工具 地址: https://pan.baidu.com/s/1hugtoLQ 密码: s5in 附官网地址 文件夹中包含三个文件: Office16安装文件 Microsoft_ ...
- python数据结构-如何为元组中的每个元素命名
如何为元组中的每个元素命名 简述 当对象数据格式固定时,用元组比列表更节省内存空间, 我们使用索引访问元组元素,但是这种访问方式会降低程序的可读性. 举个栗子 对于学生的信息,我们有固定的数据格式,我 ...
- DTCC2019第十届中国数据库技术大会将于5月在北京召开
作为国内顶级的数据领域技术盛会,10年来,DTCC见证了国内数据库技术的迅猛发展,各种分布式数据库.NoSQL.NewSQL技术异军突起,与Oracle.DB2等分庭抗礼,甚至大有超越之势.在这种背景 ...
- mysql----------mysql5.7.11导入sql文件时报错This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled
1.导入sql文件出现如下错误. [Err] 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in ...
- python工具的选择
自己喜欢用pycharm,下载地址:https://www.jetbrains.com/products.html#lang=python 补丁地址:http://idea.lanyus.com/
- caffe-ssd编译runtest时候报错:g++: internal compiler error: Killed (program cc1plus)
大哥,你的内存不够了,删点儿东西吧
- 基于CSS属性display:table的表格布局的使用
项目改造中遇到DIV+CSS实现的table,新需求需要在表格使用单元格合并,网上调查返现CSS display:table实现的table表格,没有单元格的属性和样式,经过一番思考,曲折现实了单元格 ...
- shell中wait命令详解
wait命令介绍 wait [作业指示或进程号] 1.等待作业号或者进程号制定的进程退出,返回最后一个作业或进程的退出状态状态.如果没有制定参数,则等待所有子进程的退出,其退出状态为0. 2.如果是s ...
- Python类的私有属性
class Bar(object): __age = 18 sex = 'male' def __init__(self, ): pass def f(self): print(self.__age) ...