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 listDec 22, 2025 08:25AnSaAnSaScore: 6,019,898Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 22, 2025 08:255,154,0052,080,105,7382,060,603,000999,0002,375,680
2Dec 22, 2025 08:255,383,8582,192,754,1472,152,544,000999,0002,260,992
3Dec 22, 2025 08:255,389,6132,182,511,7322,154,846,000999,0002,523,136
4Dec 22, 2025 08:255,931,2782,398,786,4662,371,512,000999,0002,387,968
5Dec 22, 2025 08:256,019,8982,436,950,2892,405,960,0001,999,0002,260,992
6Dec 22, 2025 08:256,089,9302,464,640,4792,433,973,0001,999,0002,379,776
7Dec 22, 2025 08:256,419,3102,593,162,6162,566,725,000999,0002,383,872
8Dec 22, 2025 08:256,567,6182,654,009,9832,626,048,000999,0002,519,040
9Dec 22, 2025 08:257,485,9033,022,888,7942,992,363,0001,998,0002,260,992