Logo
(追記) (追記ここまで)

11979번 - Fort Moo 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB100595758.763%

문제

Bessie is building a fort with her friend Elsie. Like any good fort, this one needs to start with a sturdy frame. Bessie wants to build a frame in the shape of a one-meter-wide rectangular outline, atop which she will build the fort.

Bessie has already chosen a site on which to build the fort -- a piece of land measuring \(N\) meters by \(M\) meters (\(1 \leq N, M \leq 200\)). Unfortunately, the site has some swampy areas that cannot be used to support the frame. Please help Bessie determine the largest area she can cover with her fort (the area of the rectangle supported by the frame), such that the frame avoids sitting on any of the swampy areas.

입력

Line 1 contains integers \(N\) and \(M\).

The next \(N\) lines each contain \(M\) characters, forming a grid describing the site. A character of '.' represents normal grass, while 'X' represents a swampy spot.

출력

A single integer representing the maximum area that Bessie can cover with her fort.

제한

예제 입력 1

5 6
......
..X..X
X..X..
......
..X...

예제 출력 1

16

힌트

In the example, the placement of the optimal frame is indicated by 'f's below:

.ffff.
.fX.fX
Xf.Xf.
.ffff.
..X...

출처

Olympiad > USA Computing Olympiad > 2015-2016 Season > USACO January 2016 Contest > Platinum 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /