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 18, 2026 00:41M-RochatM-RochatError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 18, 2026 00:43018,371,3555,088,0001,091,0002,121,728expected "50", got "49 "
2May 18, 2026 00:43017,948,1495,259,0001,140,0002,121,728expected "55", got "50 "
3May 18, 2026 00:4314,96017,046,2114,912,0001,072,0002,121,728
4May 18, 2026 00:4315,16215,314,1254,991,0001,074,0002,121,728
5May 18, 2026 00:4315,40015,520,3695,086,0001,074,0002,121,728
6May 18, 2026 00:4315,55016,453,0575,185,0001,035,0002,121,728
7May 18, 2026 00:4315,61715,414,1555,056,0001,191,0002,121,728
8May 18, 2026 00:4315,72020,113,3195,218,0001,070,0002,121,728
9May 18, 2026 00:4315,88215,749,9765,205,0001,148,0002,121,728