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 16, 2026 13:24M-RochatM-RochatScore: 1,145,022Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 16, 2026 13:261,114,795455,773,079395,396,00050,522,0002,113,536
2May 16, 2026 13:261,120,007458,399,645396,045,00051,958,0002,113,536
3May 16, 2026 13:261,121,317458,932,931397,408,00051,119,0002,113,536
4May 16, 2026 13:261,129,882461,753,142401,060,00050,893,0002,113,536
5May 16, 2026 13:261,145,022467,412,446407,536,00050,473,0002,113,536
6May 16, 2026 13:261,173,565481,665,954417,090,00052,336,0002,113,536
7May 16, 2026 13:261,177,910480,422,739420,829,00050,335,0002,113,536
8May 16, 2026 13:261,199,237491,006,411427,633,00052,062,0002,113,536
9May 16, 2026 13:261,343,887547,619,537487,644,00049,911,0002,113,536