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 listJun 4, 2025 22:27vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
May 17, 2026 14:20M-Rochat10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 14:57010,454,060811,00002,113,536expected "401", got "128 "
2May 17, 2026 14:5709,982,695804,00002,113,536expected "401", got "128 "
3May 17, 2026 14:5709,932,228811,00002,113,536expected "401", got "128 "
4Jun 4, 2025 22:272,96819,402,18101,187,0002,490,368
5Jun 4, 2025 22:273,06821,547,43201,227,0002,490,368
6Jun 4, 2025 22:273,17522,814,8171,270,00002,490,368