#P1387. 最大正方形
最大正方形
Description
In an matrix that contains only and , find a largest square that does not contain any , and output its side length. It is guaranteed that there is at least one in the matrix.
Input Format
The first line of input contains two integers . Then follow lines, each containing numbers separated by spaces, or .
Output Format
A single integer, the side length of the largest square.
4 4
0 1 1 1
1 1 1 0
0 1 1 0
1 1 0 1
2
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号