World Languages, asked by swathisinisetti567, 1 year ago

java programm An Army Helicopter (100 Marks)
The host government has promised that in addition to the security guards in each match, there will be a platoon of elite commandos that will be deployed for extra protection in each stadium for each match. In order to move quickly between cities and stadiums there will be a dedicated army helicopter on permanent stand by.

The army helicopter has to land in city (rectangular area) which contains several towers (mobile communication towers). For the safe landing of the helicopter, the landing space must not contain any tower in the landing space. A helicopter needs a square shaped landing area which has the side length greater than or equal to the helicopter length. Given a description of the tower positions of the city, you have to find the largest helicopter that can land in the city.



Input Format
The first line of input consists of number of rows (rectangular area or string arrays), N
Next N lines consist of string array. Each string contains symbols (either 'x' or 'o' or '#'). x represents a tower, 'o' represents empty space and '#' is a delimiter between the 'x' and 'o'.



Constraints
1 <= N <= 500

Output Format
Print the length of the largest helicopter that can land in the city else print -1 if input is invalid

Answers

Answered by mukeshkumar197686
0

Answer:

PLEASE FOLLOW ME AND LIKE

Similar questions