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 listNov 20, 2025 13:21izotoffizotoffScore: 1,899,703Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 20, 2025 13:211,897,830782,064,083757,132,0002,000,0002,527,232
2Nov 20, 2025 13:211,898,185789,486,951756,277,0002,997,0002,531,328
3Nov 20, 2025 13:211,898,698790,966,990758,480,000999,0002,326,528
4Nov 20, 2025 13:211,899,350782,715,387757,741,0001,999,0002,330,624
5Nov 20, 2025 13:211,899,703782,958,644757,882,0001,999,0002,531,328
6Nov 20, 2025 13:211,901,145782,406,665758,460,0001,998,0002,326,528
7Nov 20, 2025 13:211,902,545788,432,578761,018,00002,326,528
8Nov 20, 2025 13:211,903,448793,734,888760,380,000999,0002,293,760
9Nov 20, 2025 13:211,906,710787,048,859759,686,0002,998,0002,527,232