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 listMay 26, 2025 17:43E SequeiraE SequeiraScore: 873,110Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 26, 2025 17:43872,875370,491,757349,150,00002,449,408
2May 26, 2025 17:43872,895376,788,072348,158,0001,000,0002,445,312
3May 26, 2025 17:43872,948375,439,119347,178,0002,001,0002,465,792
4May 26, 2025 17:43873,053374,772,567349,221,00002,285,568
5May 26, 2025 17:43873,110373,691,930347,243,0002,001,0002,449,408
6May 26, 2025 17:43873,260377,881,031348,304,0001,000,0002,277,376
7May 26, 2025 17:43873,268371,760,370349,307,00002,265,088
8May 26, 2025 17:43873,333372,895,368348,333,0001,000,0002,285,568
9May 26, 2025 17:43873,710378,654,988347,487,0001,997,0002,285,568