#P9921. [POI 2023/2024 R1] Budowa lotniska
[POI 2023/2024 R1] Budowa lotniska
Background
Translated from XXXI Olimpiada Informatyczna - Stage I Budowa lotniska。
Problem Description
You are given an map. The map contains . and X.
Find the maximum such that:
You can find strips of size or on the map, such that the strips do not intersect, and every cell inside each strip is .。
Input Format
The first line contains two positive integers 。
The next lines describe the map。
Output Format
Output one non-negative integer in a single line: the maximum 。
5 2
.X...
.XXXX
XX...
.....
.X.X.
3
2 1
..
..
2
2 2
X.
..
1
10 2
XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX
..........
XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX
5
10 2
XX.XXXXX.X
XX.XXXXX.X
XX.XXXXX.X
XX.XXXXX.X
XX.XXXXX.X
XX.XXXXX.X
XX.XXXXX.X
XX.XXXXX.X
XX.XXXXX.X
XX.XXXXX.X
10
见附件
531
Hint
Explanation of the sample:
.X...
.XXXX
XX..2
111.2
.X.X2
Constraints: for all testdata, , , and the map contains only . and X。
| Subtask ID | Additional Constraints | Points |
|---|---|---|
| 1 | 20 | |
| 2 | 22 | |
| 3 | 23 | |
| 4 | 35 |
Translated by ChatGPT 5