Largest Square Submatrix of all 1's C#_user

Find the largest square submatrix consisting entirely of 1s as fast as possible.

Input

A 10,000 x 10,000 matrix of uint8 values (0 or 1) on STDIN.

0, 1, 0, 1, 1
0, 1, 1, 1, 1
0, 0, 1, 0, 0
1, 0, 1, 1, 0

Output

Print the side length of the largest all-ones square submatrix to STDOUT. The answer is guaranteed to be greater than 1.

For the example above, the output is:

2
Back to listSep 10, 2026 14:33Andrew EpsteinAndrew EpsteinScore: 3,780Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 10, 2026 14:343,3029,669,4051,321,00002,113,536
2Sep 10, 2026 14:343,4559,789,5131,382,00002,113,536
3Sep 10, 2026 14:343,6329,778,4471,453,00002,113,536
4Sep 10, 2026 14:343,6779,751,1221,471,00002,113,536
5Sep 10, 2026 14:343,78010,415,5601,512,00002,113,536
6Sep 10, 2026 14:343,7859,905,8821,514,00002,113,536
7Sep 10, 2026 14:343,8629,856,3481,545,00002,113,536
8Sep 10, 2026 14:343,8829,918,9221,553,00002,113,536
9Sep 10, 2026 14:343,9079,878,1511,563,00002,113,536