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 30, 2026 04:14Charles CabergsCharles CabergsScore: 99,992Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 30, 2026 04:1596,75559,355,18515,277,00023,425,0002,510,848stderr
2Apr 30, 2026 04:1599,23757,258,68421,374,00018,321,0002,514,944stderr
3Apr 30, 2026 04:1599,79256,932,31225,946,00013,971,0002,519,040stderr
4Apr 30, 2026 04:1599,81056,168,97919,962,00019,962,0002,514,944stderr
5Apr 30, 2026 04:1599,99259,600,24923,998,00015,999,0002,519,040stderr
6Apr 30, 2026 04:15101,05259,600,88818,189,00022,232,0002,519,040stderr
7Apr 30, 2026 04:15101,41561,929,84922,311,00018,255,0002,506,752stderr
8Apr 30, 2026 04:15105,70761,337,21226,175,00016,108,0002,502,656stderr
9Apr 30, 2026 04:15110,28263,386,39926,067,00018,046,0002,510,848stderr