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:16izotoffizotoffScore: 2,042,253Success
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:162,037,013845,204,277771,816,00042,989,0002,445,312
2Nov 20, 2025 13:162,040,460843,930,040773,227,00042,957,0002,330,624
3Nov 20, 2025 13:162,041,833848,008,197772,748,00043,985,0002,445,312
4Nov 20, 2025 13:162,042,025838,419,078772,821,00043,989,0002,531,328
5Nov 20, 2025 13:162,042,253841,454,767772,907,00043,994,0002,293,760
6Nov 20, 2025 13:162,042,268846,020,698773,912,00042,995,0002,289,664
7Nov 20, 2025 13:162,045,183842,906,645773,069,00045,004,0002,473,984
8Nov 20, 2025 13:162,046,118843,247,523773,478,00044,969,0002,453,504
9Nov 20, 2025 13:162,050,885843,588,493774,391,00045,963,0002,469,888