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 26, 2026 19:58Charles CabergsCharles CabergsScore: 107,235Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 26, 2026 20:00106,26560,081,34624,289,00018,217,0002,510,848
2Apr 26, 2026 20:00106,31562,681,36521,263,00021,263,0002,510,848
3Apr 26, 2026 20:00106,69064,357,71823,370,00019,306,0002,510,848
4Apr 26, 2026 20:00106,80560,056,98123,395,00019,327,0002,498,560
5Apr 26, 2026 20:00107,23561,884,83019,951,00022,943,0002,527,232
6Apr 26, 2026 20:00107,42262,676,85921,984,00020,985,0002,514,944
7Apr 26, 2026 20:00107,89761,672,65827,100,00016,059,0002,502,656
8Apr 26, 2026 20:00108,00060,607,63824,112,00019,088,0002,514,944
9Apr 26, 2026 20:00115,95065,960,97027,223,00019,157,0002,498,560