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 6, 2026 16:01Dominique GarmierDominique GarmierScore: 47,275Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 6, 2026 16:0243,96532,236,61213,288,0004,298,0002,506,752stderr
2May 6, 2026 16:0244,24738,650,56813,344,0004,355,0002,498,560stderr
3May 6, 2026 16:0245,21236,619,55513,738,0004,347,0002,510,848stderr
4May 6, 2026 16:0246,08534,441,87614,108,0004,326,0002,498,560stderr
5May 6, 2026 16:0247,27536,638,57114,582,0004,328,0002,519,040stderr
6May 6, 2026 16:0247,72537,966,93213,895,0005,195,0002,494,464stderr
7May 6, 2026 16:0247,80034,963,09614,846,0004,274,0002,502,656stderr
8May 6, 2026 16:0247,92037,960,99114,003,0005,165,0002,514,944stderr
9May 6, 2026 16:0248,04037,626,44214,896,0004,320,0002,519,040stderr