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 13:45Dominique GarmierDominique GarmierScore: 23,936,685Success
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 13:4823,638,3629,476,882,0129,426,360,00028,985,0002,326,528
2Apr 28, 2026 13:4823,640,2659,475,871,4209,435,117,00020,989,0002,326,528
3Apr 28, 2026 13:4823,667,1179,486,448,0269,442,861,00023,986,0002,326,528
4Apr 28, 2026 13:4823,711,7579,509,438,5909,459,717,00024,986,0002,326,528
5Apr 28, 2026 13:4823,936,6859,597,053,8599,548,689,00025,985,0002,322,432
6Apr 28, 2026 13:4824,766,1979,928,073,8589,880,494,00025,985,0002,322,432
7Apr 28, 2026 13:4824,886,9509,978,307,9039,926,795,00027,985,0002,322,432
8Apr 28, 2026 13:4826,097,48010,464,653,51910,410,006,00028,986,0002,326,528
9Apr 28, 2026 13:4827,428,57210,993,352,61610,945,445,00025,984,0002,330,624