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:46olliecrowolliecrowScore: 10,632Success
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:4710,20018,584,2542,040,0002,040,0002,539,520
2Apr 23, 2026 04:4710,39019,983,6862,078,0002,078,0002,551,808
3Apr 23, 2026 04:4710,42518,352,2412,085,0002,085,0002,547,712
4Apr 23, 2026 04:4710,51023,222,2174,204,00002,547,712
5Apr 23, 2026 04:4710,63223,220,7044,253,00002,535,424
6Apr 23, 2026 04:4710,68016,483,2703,204,0001,068,0002,555,904
7Apr 23, 2026 04:4710,71519,103,2383,215,0001,071,0002,543,616
8Apr 23, 2026 04:4710,76517,010,8183,230,0001,076,0002,539,520
9Apr 23, 2026 04:4710,81022,044,3113,243,0001,081,0002,543,616