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 listOct 8, 2025 21:06Yuriy LyfenkoYuriy LyfenkoScore: 11,390Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 18, 2025 04:0110,65518,976,5142,131,0002,131,0002,392,064
2Aug 18, 2025 04:1110,71525,110,7962,143,0002,143,0002,281,472
3Aug 18, 2025 04:1111,06020,141,1193,318,0001,106,0002,387,968
4Aug 18, 2025 04:1211,09022,045,5233,327,0001,109,0002,392,064
5Aug 18, 2025 04:1211,27024,904,2163,381,0001,127,0002,281,472
6Aug 18, 2025 04:0111,34020,431,1373,402,0001,134,0002,396,160
7Aug 18, 2025 04:0111,34525,954,8583,404,0001,134,0002,281,472
8Oct 8, 2025 21:0611,35021,452,6603,405,0001,135,0002,486,272
9Aug 18, 2025 04:0111,38320,760,0054,553,00002,281,472
10Aug 18, 2025 04:0111,39020,109,3564,556,00002,387,968
11Oct 8, 2025 21:0611,48520,125,4343,446,0001,148,0002,281,472
12Aug 18, 2025 04:1111,53024,099,4463,459,0001,153,0002,281,472
13Aug 18, 2025 04:0111,55019,220,9793,465,0001,155,0002,396,160
14Aug 18, 2025 04:0111,62023,944,8113,486,0001,162,0002,281,472
15Oct 8, 2025 21:0611,67820,349,7404,671,00002,281,472
16Aug 18, 2025 04:0111,69020,481,4884,676,00002,494,464
17Aug 18, 2025 04:0111,73323,845,3893,520,0001,173,0002,396,160
18Aug 18, 2025 04:1211,93022,163,2304,772,00002,281,472