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 22, 2026 07:37olliecrowolliecrowError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 9, 2026 10:35Tomislav Tunkovic154.48CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 9, 2026 10:3609,072,360965,00002,117,632expected "2", got "50"
2Apr 22, 2026 07:404,4608,179,63701,784,0002,465,792
3Sep 9, 2026 10:365,96010,536,8452,384,00002,117,632
4Apr 22, 2026 07:406,4627,984,33802,585,0002,453,504
5Apr 22, 2026 07:406,4928,105,64502,597,0002,560,000
6Sep 9, 2026 10:367,38211,101,5682,953,00002,117,632