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:39Yuriy LyfenkoYuriy LyfenkoScore: 11,063Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 8, 2025 21:4710,14527,348,5932,029,0002,029,0002,387,968
2Oct 8, 2025 21:4710,47025,672,2532,094,0002,094,0002,383,872
3Oct 8, 2025 21:3010,53021,217,5742,106,0002,106,0002,396,160
4Oct 8, 2025 21:4710,67523,381,2412,135,0002,135,0002,396,160
5Oct 8, 2025 21:3010,69523,920,2992,139,0002,139,0002,293,760
6Oct 8, 2025 21:4710,89020,631,5104,356,00002,281,472
7Oct 8, 2025 21:4710,99320,169,3443,298,0001,099,0002,285,568
8Oct 8, 2025 21:4711,06321,150,8281,106,0003,319,0002,400,256
9Oct 8, 2025 21:4711,14523,446,5483,344,0001,114,0002,383,872
10Oct 8, 2025 21:4711,19021,166,0423,357,0001,119,0002,396,160
11Oct 8, 2025 21:3911,36323,211,7094,545,00002,281,472
12Oct 8, 2025 21:3911,39526,039,4843,419,0001,139,0002,281,472
13Oct 8, 2025 21:3011,41021,788,9973,423,0001,141,0002,387,968
14Oct 8, 2025 21:4711,50016,322,8943,450,0001,150,0002,281,472
15Oct 8, 2025 21:3911,65020,626,6933,495,0001,165,0002,281,472