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 listAug 21, 2025 19:12Aniruddha DebAniruddha DebScore: 3,605Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 21, 2025 19:163,26516,597,24301,306,0002,433,024
2Aug 21, 2025 18:553,27021,417,00901,308,0002,433,024
3Aug 21, 2025 19:013,29516,133,91501,318,0002,428,928
4Aug 21, 2025 19:013,32317,498,35601,329,0002,433,024
5Aug 21, 2025 19:093,36815,131,70101,347,0002,510,848
6Aug 21, 2025 19:133,37020,085,14501,348,0002,433,024
7Aug 21, 2025 19:093,39518,496,7561,358,00002,433,024
8Aug 21, 2025 19:133,39818,793,8171,359,00002,437,120
9Aug 21, 2025 19:163,41015,000,4381,364,00002,433,024
10Aug 21, 2025 19:123,60517,118,4461,442,00002,433,024
11Aug 21, 2025 18:55850,768360,745,599340,307,00002,408,448
12Aug 21, 2025 19:12850,880367,589,789340,352,00002,277,376
13Aug 21, 2025 19:16850,983363,008,519339,392,0001,001,0002,416,640
14Aug 21, 2025 19:13851,013363,777,664340,405,00002,408,448
15Aug 21, 2025 19:09851,105366,620,373340,442,00002,502,656
16Aug 21, 2025 19:12851,218367,504,639339,489,000998,0002,277,376
17Aug 21, 2025 19:01851,720366,925,284340,688,00002,412,544
18Aug 21, 2025 18:55851,863360,936,972340,745,00002,277,376