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 22, 2026 16:30olliecrowolliecrowScore: 10,440Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 22, 2026 16:3110,19024,679,4112,038,0002,038,0002,547,712
2Apr 22, 2026 16:3110,22022,945,4302,044,0002,044,0002,547,712
3Apr 22, 2026 16:3110,27018,732,1332,054,0002,054,0002,547,712
4Apr 22, 2026 16:3110,43520,876,6992,087,0002,087,0002,551,808
5Apr 22, 2026 16:3110,44019,639,5642,088,0002,088,0002,555,904
6Apr 22, 2026 16:3110,48017,681,8553,144,0001,048,0002,547,712
7Apr 22, 2026 16:3110,51024,022,6043,153,0001,051,0002,555,904
8Apr 22, 2026 16:3110,56225,449,6723,169,0001,056,0002,555,904
9Apr 22, 2026 16:3110,93525,827,1623,281,0001,093,0002,555,904