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 20, 2025 21:06idatsyidatsyScore: 1,128,933Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 20, 2025 21:061,128,590479,656,801450,438,000998,0002,461,696
2Dec 20, 2025 21:061,128,853483,481,807449,544,0001,997,0002,285,568
3Dec 20, 2025 21:061,128,855477,369,044448,546,0002,996,0002,355,200
4Dec 20, 2025 21:061,128,930476,072,592451,572,00002,359,296
5Dec 20, 2025 21:061,128,933478,085,474448,576,0002,997,0002,285,568
6Dec 20, 2025 21:061,128,955477,405,264449,584,0001,998,0002,351,104
7Dec 20, 2025 21:061,128,958478,774,564449,585,0001,998,0002,355,200
8Dec 20, 2025 21:061,129,115478,072,728449,648,0001,998,0002,355,200
9Dec 20, 2025 21:061,129,383476,183,376449,755,0001,998,0002,347,008