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 26, 2026 20:42TudyMTudyMScore: 1,143,055Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 26, 2026 20:441,142,402479,140,034454,962,0001,999,0002,510,848
2Apr 26, 2026 20:441,142,705477,390,762455,082,0002,000,0002,506,752
3Apr 26, 2026 20:441,142,895472,754,915456,158,0001,000,0002,502,656
4Apr 26, 2026 20:441,142,905479,375,635455,162,0002,000,0002,502,656
5Apr 26, 2026 20:441,143,055477,260,212456,222,0001,000,0002,506,752
6Apr 26, 2026 20:441,143,162474,497,355456,265,0001,000,0002,318,336
7Apr 26, 2026 20:441,143,197475,020,742456,279,0001,000,0002,519,040
8Apr 26, 2026 20:441,143,665474,030,991455,469,0001,997,0002,502,656
9Apr 26, 2026 20:441,143,760475,654,035454,508,0002,996,0002,514,944