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 28, 2026 12:50Dominique GarmierDominique GarmierScore: 210,045Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 28, 2026 12:51208,665103,145,68182,461,0001,005,0002,498,560
2Apr 28, 2026 12:51209,625101,343,49581,854,0001,996,0002,498,560
3Apr 28, 2026 12:51209,887103,406,85881,957,0001,998,0002,502,656
4Apr 28, 2026 12:51209,967104,215,18281,988,0001,999,0002,514,944
5Apr 28, 2026 12:51210,04597,962,90682,018,0002,000,0002,498,560
6Apr 28, 2026 12:51210,112103,061,21482,044,0002,001,0002,330,624
7Apr 28, 2026 12:51210,150106,435,98781,058,0003,002,0002,330,624
8Apr 28, 2026 12:51210,192102,081,63882,076,0002,001,0002,342,912
9Apr 28, 2026 12:51210,817103,961,11482,320,0002,007,0002,510,848