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 11:22Dominique GarmierDominique GarmierScore: 28,837Success
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 11:2328,38226,591,47810,321,0001,032,0002,514,944
2Apr 23, 2026 11:2328,65531,933,34710,420,0001,042,0002,510,848
3Apr 23, 2026 11:2328,79231,360,08510,470,0001,047,0002,510,848
4Apr 23, 2026 11:2328,81532,374,21510,479,0001,047,0002,510,848
5Apr 23, 2026 11:2328,83724,917,11110,487,0001,048,0002,523,136
6Apr 23, 2026 11:2328,84228,660,62311,537,00002,510,848
7Apr 23, 2026 11:2329,00031,325,67210,546,0001,054,0002,506,752
8Apr 23, 2026 11:2329,01226,964,47510,550,0001,055,0002,506,752
9Apr 23, 2026 11:2329,02727,450,5119,500,0002,111,0002,519,040