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 14, 2025 17:52NoSIMD_C#NoSIMD_C#Score: 243,368Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 11, 2025 02:12238,195120,391,27353,155,00042,123,0002,392,064
2May 11, 2025 01:58238,643118,286,21853,255,00042,202,0002,424,832
3May 11, 2025 01:58239,085120,461,90954,360,00041,274,0002,392,064
4May 11, 2025 02:12239,760116,396,84854,945,00040,959,0002,318,336
5May 11, 2025 01:58239,900115,971,16552,978,00042,982,0002,478,080
6May 11, 2025 01:58240,598118,932,58555,137,00041,102,0002,383,872
7May 11, 2025 02:12240,820121,350,51455,188,00041,140,0002,420,736
8May 11, 2025 02:12241,123116,684,24755,257,00041,192,0002,428,928
9May 11, 2025 02:12241,445124,754,51254,325,00042,253,0002,330,624
10May 11, 2025 02:12242,185118,357,01754,929,00041,945,0002,306,048
11May 11, 2025 02:12242,293120,677,07854,953,00041,964,0002,506,752
12May 11, 2025 01:58242,343120,004,47853,965,00042,972,0002,379,776
13May 11, 2025 01:58242,958115,216,92153,100,00044,083,0002,363,392
14May 11, 2025 02:12243,368117,659,23455,197,00042,150,0002,379,776
15May 11, 2025 02:12243,748124,834,19955,283,00042,216,0002,375,680
16May 11, 2025 01:58244,720123,177,69754,937,00042,951,0002,383,872
17May 11, 2025 01:58245,075119,581,40755,017,00043,013,0002,383,872
18May 11, 2025 01:58246,948126,039,51656,873,00041,906,0002,387,968
19May 14, 2025 17:52769,230334,529,911265,598,00042,094,0002,387,968
20May 19, 2025 06:15773,218330,423,293267,248,00042,039,0002,367,488
21May 19, 2025 06:15775,228335,679,073267,079,00043,012,0002,478,080
22May 19, 2025 05:00775,525331,357,281268,182,00042,028,0002,363,392
23May 19, 2025 05:00776,940332,144,387266,808,00043,968,0002,498,560
24May 19, 2025 05:00777,415334,056,063267,971,00042,995,0002,527,232
25May 14, 2025 17:52779,673337,575,241268,887,00042,982,0002,379,776
26May 19, 2025 06:15780,378333,034,730268,130,00044,021,0002,281,472
27May 14, 2025 17:52783,718336,085,605268,561,00044,926,0002,445,312