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

26542번 - Square Pen 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB93634865.753%

문제

You want to create a huge square pen for your animals in one of your fields. That way they can enjoy the sunlight instead of staying pent up in their dusty barn all year. Your field is still messy though. You don’t want to clean it, you just want to build the biggest possible square pen without any junk in it. Given the layout of your field, determine the area of the largest square pen you can make.

입력

The first line will contain a single integer n that indicates the number of data sets that follow. Each data set will start with a single integer s denoting the side length of your square field. The next s lines will consist of the layout of your field, with “#” denoting an obstacle, and ‘.’ denoting a free space.

출력

For each test case, output the area of the largest square pen you can make without it having any obstacles inside of it.

제한

예제 입력 1

2
5
...##
##...
.....
#....
#..##
6
...##.
##..##
..###.
#.....
#..##.
..##..

예제 출력 1

9
4

힌트

출처

School > PLU High School Programming Contest > PLU 2017 > Advanced 10번

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

출처

대학교 대회

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

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