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:05izotoffizotoffScore: 2,071,618Success
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:052,066,233853,547,036777,523,00048,970,0002,453,504
2Nov 20, 2025 13:052,068,915854,874,983777,593,00049,973,0002,478,080
3Nov 20, 2025 13:052,070,115855,929,013779,044,00049,002,0002,330,624
4Nov 20, 2025 13:052,070,743857,288,261780,338,00047,959,0002,330,624
5Nov 20, 2025 13:052,071,618854,751,920779,609,00049,038,0002,355,200
6Nov 20, 2025 13:052,072,968858,351,111778,237,00050,950,0002,408,448
7Nov 20, 2025 13:052,073,228854,759,995780,333,00048,958,0002,412,544
8Nov 20, 2025 13:052,073,308854,977,692782,362,00046,961,0002,445,312
9Nov 20, 2025 13:052,073,643854,682,378779,490,00049,967,0002,412,544