Largest Square Submatrix of all 1's C#_user

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 19, 2026 01:33olliecrowolliecrowError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 9, 2026 10:35Tomislav Tunkovic118.81CustomSolution Broken
Sep 8, 2026 06:26C#_user118.81CustomSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 9, 2026 10:36012,611,8731,317,0001,645,0002,138,112expected "2", got "50"
2Sep 9, 2026 10:36012,998,0521,334,0001,639,0002,179,072expected "7", got "50"
3Apr 19, 2026 01:338,02518,708,3711,070,0002,140,0002,310,144
4Apr 19, 2026 01:338,29524,302,6121,106,0002,212,0002,297,856
5Apr 19, 2026 01:338,81326,388,4071,175,0002,350,0002,297,856
6Sep 9, 2026 10:3610,73013,973,8252,898,0001,394,0002,138,112