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 2, 2025 07:32AnSaAnSaScore: 6,307,888Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 2, 2025 07:085,784,2202,335,582,7952,311,690,0001,998,0002,375,680
2Oct 2, 2025 07:085,879,2332,378,943,2952,349,695,0001,998,0002,277,376
3Oct 2, 2025 07:086,121,0252,473,110,7842,446,412,0001,998,0002,281,472
4Oct 2, 2025 07:326,133,2752,486,204,4762,452,311,000999,0002,535,424
5Oct 2, 2025 07:086,152,2652,485,235,0122,458,907,0001,999,0002,281,472
6Oct 2, 2025 07:326,184,2652,498,286,8902,471,708,0001,998,0002,281,472
7Oct 2, 2025 07:326,200,0952,505,627,0562,480,038,00002,281,472
8Oct 2, 2025 07:326,217,0232,510,016,6982,484,810,0001,999,0002,269,184
9Oct 2, 2025 07:086,250,2482,527,964,2332,499,100,000999,0002,281,472
10Oct 2, 2025 07:326,307,8882,549,906,6632,522,156,000999,0002,281,472
11Oct 2, 2025 07:326,339,2532,559,085,7172,534,702,000999,0002,277,376
12Oct 2, 2025 07:326,340,4002,564,768,7622,535,161,000999,0002,265,088
13Oct 2, 2025 07:086,493,3302,623,378,1182,596,333,000999,0002,281,472
14Oct 2, 2025 07:326,646,6532,681,928,0892,656,663,0001,998,0002,277,376
15Oct 2, 2025 07:326,697,1552,705,304,7512,677,863,000999,0002,281,472
16Oct 2, 2025 07:086,697,6752,707,664,3502,678,071,000999,0002,281,472
17Oct 2, 2025 07:086,746,5052,722,681,2432,698,602,00002,273,280
18Oct 2, 2025 07:086,976,3432,815,541,4852,788,539,0001,998,0002,277,376