Largest Square Submatrix of all 1's NoSIMD_C#

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 listMay 1, 2026 09:36Dominique GarmierDominique GarmierScore: 26,235Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 1, 2026 09:3725,78024,804,7969,281,0001,031,0002,371,584
2May 1, 2026 09:3726,03527,997,3609,373,0001,041,0002,367,488
3May 1, 2026 09:3726,14026,080,4519,411,0001,045,0002,322,432
4May 1, 2026 09:3726,18531,168,9199,427,0001,047,0002,375,680
5May 1, 2026 09:3726,23527,210,3429,445,0001,049,0002,367,488
6May 1, 2026 09:3726,28231,608,8559,462,0001,051,0002,326,528
7May 1, 2026 09:3726,32031,794,7749,476,0001,052,0002,371,584
8May 1, 2026 09:3726,43529,639,1629,517,0001,057,0002,371,584
9May 1, 2026 09:3726,73730,577,3799,626,0001,069,0002,367,488