Fort Moo
의견: 0
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.
Problem credits: Nathan Pinsker
Problem credits: Nathan Pinsker
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.
fortmoo.infortmoo.out5 6
......
..X..X
X..X..
......
..X...16In the example, the placement of the optimal frame is indicated by 'f's below:
.ffff.
.fX.fX
Xf.Xf.
.ffff.
..X...
riseoj 작성
출처 올림피아드 > USACO > 2015-2016 > January > Platinum
평가 및 의견
Fort Moo
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Fort Moo