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 listApr 22, 2026 20:59olliecrowolliecrowScore: 10,500Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 22, 2026 21:0210,23520,559,7882,047,0002,047,0002,555,904
2Apr 22, 2026 21:0210,24017,547,3752,048,0002,048,0002,547,712
3Apr 22, 2026 21:0210,29527,334,8091,647,0002,471,0002,551,808
4Apr 22, 2026 21:0210,47524,441,3243,143,0001,047,0002,555,904
5Apr 22, 2026 21:0210,50019,766,6663,150,0001,050,0002,355,200
6Apr 22, 2026 21:0210,52022,555,5532,104,0002,104,0002,555,904
7Apr 22, 2026 21:0210,69021,943,2293,207,0001,069,0002,551,808
8Apr 22, 2026 21:0210,70021,928,2982,140,0002,140,0002,547,712
9Apr 22, 2026 21:0210,84217,179,2554,337,00002,555,904