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 20, 2026 21:03olliecrowolliecrowScore: 7,270Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 20, 2026 21:046,56522,104,7441,313,0001,313,0002,502,656
2Apr 20, 2026 21:046,76022,288,5481,352,0001,352,0002,506,752
3Apr 20, 2026 21:046,82723,741,9882,731,00002,490,368
4Apr 20, 2026 21:047,11025,167,5621,422,0001,422,0002,486,272
5Apr 20, 2026 21:047,27022,323,7821,939,000969,0002,490,368
6Apr 20, 2026 21:047,48022,501,234997,0001,995,0002,490,368
7Apr 20, 2026 21:047,79218,433,6401,039,0002,078,0002,486,272
8Apr 20, 2026 21:048,24518,639,2652,199,0001,099,0002,486,272
9Apr 20, 2026 21:048,57225,677,7142,286,0001,143,0002,490,368