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 listApr 23, 2026 04:51olliecrowolliecrowScore: 10,555Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 23, 2026 04:5210,39521,265,9682,079,0002,079,0002,547,712
2Apr 23, 2026 04:5210,47022,310,4082,094,0002,094,0002,547,712
3Apr 23, 2026 04:5210,53220,410,7593,160,0001,053,0002,351,104
4Apr 23, 2026 04:5210,54021,142,8383,162,0001,054,0002,547,712
5Apr 23, 2026 04:5210,55521,558,8243,167,0001,055,0002,547,712
6Apr 23, 2026 04:5210,56526,377,9974,226,00002,551,808
7Apr 23, 2026 04:5210,57520,280,1133,173,0001,057,0002,543,616
8Apr 23, 2026 04:5210,62516,085,5703,188,0001,062,0002,551,808
9Apr 23, 2026 04:5210,79224,344,6783,238,0001,079,0002,547,712