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 listMay 9, 2026 14:30E SequeiraE SequeiraScore: 357,422Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 14:32357,152158,720,748141,825,0001,036,0002,322,432
2May 9, 2026 14:32357,235161,423,390141,817,0001,077,0002,330,624
3May 9, 2026 14:32357,245157,859,993141,855,0001,043,0002,326,528
4May 9, 2026 14:32357,397161,963,369141,870,0001,089,0002,334,720
5May 9, 2026 14:32357,422162,557,557141,932,0001,037,0002,318,336
6May 9, 2026 14:32357,452160,820,837141,928,0001,053,0002,330,624
7May 9, 2026 14:32357,500162,076,533141,940,0001,060,0002,330,624
8May 9, 2026 14:32357,532161,326,221141,909,0001,104,0002,334,720
9May 9, 2026 14:32357,537160,692,802141,955,0001,060,0002,318,336