Type: Default 1000ms 256MiB

abc151_d

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

问题描述

给出一个H行W列的方格,字符是'#'则表示墙,'.'表示空地。每一步可从一个空地走到上下左右相邻的空地,但不能对角线走。保证空地之间可以互相到达。

问:距离最大的两个空地之间的距离。

1≤H,W≤20

输入数据

第一行两个整数 H 和 W。

接下来H行,表示地图。

输出格式

一个整数。

3 5
...#.
.#.#.
.#...
10

10.1 国庆普及组训练

Not Attended
Status
Done
Rule
IOI
Problem
8
Start at
2024-10-1 8:00
End at
2024-10-1 12:00
Duration
4 hour(s)
Host
Partic.
12