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 22, 2026 21:08M-RochatM-RochatScore: 11,412Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 22, 2026 21:0911,17513,794,4063,389,0001,081,0002,121,728
2May 22, 2026 21:0911,25514,385,2073,404,0001,098,0002,121,728
3May 22, 2026 21:0911,31015,303,0643,441,0001,083,0002,121,728
4May 22, 2026 21:0911,36015,795,9933,442,0001,102,0002,121,728
5May 22, 2026 21:0911,41214,577,3253,482,0001,083,0002,121,728
6May 22, 2026 21:0911,51213,961,9163,541,0001,064,0002,121,728
7May 22, 2026 21:0911,60714,205,9813,484,0001,159,0002,121,728
8May 22, 2026 21:0911,63515,441,3563,598,0001,056,0002,121,728
9May 22, 2026 21:0911,65214,416,6223,591,0001,070,0002,121,728