题目名称 1518. [POJ2411] Mondriaan's Dream
输入输出 examfive.in/out
难度等级 ★★
时间限制 3000 ms (3 s)
内存限制 64 MiB
测试数据 10
题目来源 Gravatarcstdio 于2014-02-04加入
开放分组 全部用户
提交状态
分类标签
分享题解
通过:81, 提交:130, 通过率:62.31%
GravatarAAAAAAAAAA 100 0.000 s 0.00 MiB C++
Gravatarkxxy 100 0.000 s 0.00 MiB C++
Gravatar1020 100 0.000 s 0.00 MiB C++
Gravatardsn 100 0.000 s 0.00 MiB C++
Gravatar小金 100 0.000 s 0.00 MiB C++
Gravatar小金 100 0.000 s 0.00 MiB C++
Gravatar(ˇˍˇ) ~耶稣 100 0.002 s 0.16 MiB Pascal
Gravatar乌龙猹 100 0.002 s 0.28 MiB C++
Gravatar奶猹 100 0.002 s 0.29 MiB C++
Gravatarzgyzhaoguangyang 100 0.003 s 0.16 MiB Pascal
本题关联比赛
exam
关于 Mondriaan's Dream 的近10条评论(全部评论)
很多细节注意
Gravatar┭┮﹏┭┮
2023-08-08 19:16 10楼
long long? long long!
Gravatarsxysxy
2017-05-15 15:42 9楼
轮廓线第一题。
日了吉娃娃不比暴力状压dp快多少
Gravatarconfoo
2017-03-02 18:03 8楼
歪歪斜斜的每一叶上都写着“状压dp”几个字。我横竖睡不着,仔细看了半夜,才从字缝里看出字来,满本都写着两个字是“暴力”!
GravatarRapiz
2017-02-28 20:17 7楼
回复 @Hzoi_Queuer :
膜拜楼上上智商
GravatarAntiLeaf
2016-11-13 21:15 6楼
回复 @Hzoi_Queuer :
膜拜楼上智商
Gravatar牧殇
2016-11-13 21:04 5楼
智商为负,打表都打错了2次。。。。。。
GravatarHzoi_Queuer
2016-11-13 20:59 4楼
要我说,做人要厚道,标签是状压,怎么能打表过呢 :)
GravatarSteve
2016-02-19 23:03 3楼
同楼上。。
Gravatar奶猹
2014-10-31 21:24 2楼
121种情况打表秒过
GravatarOI永别
2014-05-07 20:39 1楼

1518. [POJ2411] Mondriaan's Dream

★★   输入文件:examfive.in   输出文件:examfive.out   简单对比
时间限制:3 s   内存限制:64 MiB

【题目描述】

Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, for all of his paper was filled with squares and rectangles), he dreamt of filling a large rectangle with small rectangles of width 2 and height 1 in varying ways.

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!

【输入格式】

The input contains several test cases. Each test case is made up of two integer numbers: the height h and the width w of the large rectangle. Input is terminated by h=w=0. Otherwise, 1<=h,w<=11.

【输出格式】

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.

【中文题意】

给出 $h\times w$ ($1≤h, w≤11$)的方格棋盘,用 $1\times2$ 的长方形骨牌不重叠地覆盖这个棋盘,求覆盖满的方案数。

【输入格式】

输入文件包含多组数据。

每组数据有一行,两个正整数$h, w$。

【输出格式】

输入结束标志为$h=w=0$.

对每组数据,输出一行一个正整数,即方案总数。

【样例输入】

1 2
1 3
1 4
2 2
2 3
2 4
2 11
4 11
0 0

【样例输出】

1
0
1
2
3
5
144
51205

【来源】

POJ 2411