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 22:04Charles CabergsCharles CabergsScore: 166,960Success
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 22:05162,60584,360,13032,021,00033,021,0002,510,848stderr
2Apr 23, 2026 22:05162,68282,099,65233,037,00032,036,0002,519,040stderr
3Apr 23, 2026 22:05162,77578,727,07235,059,00030,051,0002,519,040stderr
4Apr 23, 2026 22:05163,25783,058,48338,177,00027,126,0002,510,848stderr
5Apr 23, 2026 22:05166,96084,823,05531,897,00034,887,0002,523,136stderr
6Apr 23, 2026 22:05170,45086,698,41634,090,00034,090,0002,519,040stderr
7Apr 23, 2026 22:05170,94785,791,30135,195,00033,184,0002,510,848stderr
8Apr 23, 2026 22:05172,35291,999,54135,969,00032,972,0002,510,848stderr
9Apr 23, 2026 22:05173,02588,895,49441,125,00028,085,0002,514,944stderr