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 9, 2026 19:18E SequeiraE SequeiraScore: 1,388,405Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 19:221,385,380579,119,586426,901,000127,251,000479,232
2May 9, 2026 19:221,387,170585,867,660427,088,000127,780,000487,424
3May 9, 2026 19:221,387,437585,073,117427,012,000127,963,000442,368
4May 9, 2026 19:221,388,147604,813,625426,996,000128,263,000487,424
5May 9, 2026 19:221,388,405589,719,530426,991,000128,371,000442,368
6May 9, 2026 19:221,389,577583,949,670427,264,000128,567,000487,424
7May 9, 2026 19:221,394,030596,304,970427,282,000130,330,000430,080
8May 9, 2026 19:221,394,550602,158,386426,970,000130,850,000430,080
9May 9, 2026 19:221,396,367602,240,450427,057,000131,490,000430,080