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 16:07Aleksei ShahoikaAleksei ShahoikaScore: 789,137Success
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 16:08788,330331,954,981314,227,0001,105,0002,334,720
2May 9, 2026 16:08788,695330,277,782314,437,0001,041,0002,322,432
3May 9, 2026 16:08788,950333,036,530314,507,0001,073,0002,318,336
4May 9, 2026 16:08789,122334,052,589314,640,0001,009,0002,330,624
5May 9, 2026 16:08789,137334,114,936314,621,0001,034,0002,314,240
6May 9, 2026 16:08789,200331,360,132314,667,0001,013,0002,338,816
7May 9, 2026 16:08789,282330,432,097314,702,0001,011,0002,322,432
8May 9, 2026 16:08789,615332,625,868314,819,0001,027,0002,322,432
9May 9, 2026 16:08790,865335,137,741315,247,0001,099,0002,334,720