QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 256 MB Total points: 100

#15139. 地板

统计

lxhgww 的小名叫“小 L”,这是因为他总是很喜欢 L 型的东西。小 L 家的客厅是一个 $R \times C$ 的矩形,现在他想用 $L$ 型的地板来铺满整个客厅,客厅里有些位置有柱子,不能铺地板。现在小 L 想知道,用 L 型的地板铺满整个客厅有多少种不同的方案?

需要注意的是,如下图所示, L 型地板的两端长度可以任意变化,但不能长度为 $0$。铺设完成后,客厅里面所有没有柱子的地方都必须铺上地板,但同一个地方不能被铺多次。

problem_15139_1.png

输入格式

输入的第一行包含两个整数,$R$ 和 $C$,表示客厅的大小。

接着是 $R$ 行,每行 $C$ 个字符。 _ 表示对应的位置是空的,必须铺地板; * 表示对应的位置有柱子,不能铺地板。

输出格式

输出一行,包含一个整数,表示铺满整个客厅的方案数。由于这个数可能很大,只需输出它除以 $20110520$ 的余数。

样例数据

样例 1 输入

2 2
*_
__

样例 1 输出

1

样例 2 输入

3 3
___
_*_
___

样例 2 输出

8

子任务

测试点编号 1,2 3,4,5 6,7,8,9,10
数据范围 $R \times C \le 25$ $R \times C \le 100$ 并且 ($R = 2$ 或者 $C = 2$) $R \times C \le 100$

Discussions

About Discussions

The discussion section is only for posting: Editorials, General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues. Submitting multiple issues may cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.