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 listNov 19, 2025 19:05Yuriy LyfenkoYuriy LyfenkoScore: 8,563Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 19, 2025 18:437,32019,522,5882,928,00002,510,848
2Nov 19, 2025 19:027,66024,426,2402,043,0001,021,0002,367,488
3Nov 19, 2025 18:437,68019,361,2452,048,0001,024,0002,531,328
4Nov 19, 2025 19:027,73020,982,79303,092,0002,535,424
5Nov 19, 2025 19:028,14514,847,4692,172,0001,086,0002,359,296
6Nov 19, 2025 18:438,37524,787,3523,350,00002,531,328
7Nov 19, 2025 18:438,39517,428,4313,358,00002,531,328
8Nov 19, 2025 19:028,42019,495,1323,368,00002,371,584
9Nov 19, 2025 18:438,50820,489,5952,269,0001,134,0002,359,296
10Nov 19, 2025 19:058,53824,326,1292,277,0001,138,0002,359,296
11Nov 19, 2025 19:028,54520,551,4913,418,00002,371,584
12Nov 19, 2025 18:458,55315,399,1893,421,00002,457,600
13Nov 19, 2025 18:458,56322,056,6583,425,00002,531,328
14Nov 19, 2025 18:438,59520,572,1683,438,00002,371,584
15Nov 19, 2025 19:028,60822,830,8713,443,00002,371,584
16Nov 19, 2025 18:438,61014,583,2803,444,00002,367,488
17Nov 19, 2025 19:028,63319,241,3243,453,00002,371,584
18Nov 19, 2025 18:438,65819,021,3193,463,00002,531,328
19Nov 19, 2025 19:058,67519,203,6783,470,00002,531,328
20Nov 19, 2025 19:028,68519,263,7753,474,00002,359,296
21Nov 19, 2025 19:058,73017,332,6002,328,0001,164,0002,531,328
22Nov 19, 2025 18:458,73819,426,6772,330,0001,165,0002,367,488
23Nov 19, 2025 18:438,80516,151,4472,348,0001,174,0002,457,600
24Nov 19, 2025 19:028,95518,766,6693,582,00002,367,488