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 21:58vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
May 17, 2026 14:58M-Rochat10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 15:30010,174,577706,000020,480expected "293", got "50 "
2May 17, 2026 15:3008,730,086681,000020,480expected "293", got "50 "
3May 17, 2026 15:30012,044,3681,002,00002,113,536expected "293", got "50 "
4Jun 4, 2025 21:583,07317,040,1371,229,00002,494,464
5Jun 4, 2025 21:583,12520,475,68001,250,0002,490,368
6Jun 4, 2025 21:583,47016,243,6541,388,00002,531,328