Question: Input: The input consists of two lines. The first line contains two space - separated integers, m and n , the number of rows and
Input:
The input consists of two lines. The first line contains two spaceseparated integers, and the number of rows and columns in the grid, respectively. The second line contains strings, each of length representing the grid. Each character in the grid is either a : representing good land or an representing a hole
Output:
The output consists of a single integer, the perimeter of the largest possible rectangular area that does not contain any holes. If such an area cannot be constructed, output the string "impossible".
Constraints:
samples:
Sample Input:
xx
Sample Output:
Sample Input:
Sample Output:
Imp
Example :
table
In this example we can build only possible paling does not contain any holes
tableossibleqquadImportant note: the execution time shouldn't exceed seconds and any test case that exceeds the limit will be considered a timeout.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
