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 listAug 1, 2026 04:57Warren FuWarren FuScore: 98,257Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 1, 2026 04:5889,86246,691,73123,906,00012,039,0002,121,728
2Aug 1, 2026 04:5890,50546,268,28124,287,00011,915,0002,121,728
3Aug 1, 2026 04:5893,19247,314,54825,366,00011,911,0002,121,728
4Aug 1, 2026 04:5895,30748,279,04827,422,00010,701,0002,117,632
5Aug 1, 2026 04:5898,25750,100,55627,316,00011,987,0002,121,728
6Aug 1, 2026 04:58100,54251,100,16628,122,00012,095,0002,121,728
7Aug 1, 2026 04:58100,79251,180,99829,507,00010,810,0002,117,632
8Aug 1, 2026 04:58100,81751,121,07029,442,00010,885,0002,117,632
9Aug 1, 2026 04:58101,36751,331,09329,646,00010,901,0002,117,632