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 listAug 17, 2026 20:43Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 00:53Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 02:37011,349,3821,795,000090,112expected "2", got "50 "stderr
2Aug 17, 2026 20:514,15211,067,9521,661,000090,112stderr
3Aug 17, 2026 20:514,25511,482,00101,702,00045,056stderr
4Aug 17, 2026 20:514,40011,534,8641,760,000090,112stderr
5Aug 17, 2026 20:514,46211,183,00001,785,00045,056stderr
6Aug 17, 2026 20:514,54511,270,8101,818,000090,112stderr
7Aug 17, 2026 20:514,60511,408,8671,842,000090,112stderr
8Aug 17, 2026 20:514,62011,627,45501,848,00045,056stderr
9Aug 17, 2026 20:514,70711,351,93201,883,00045,056stderr
10Aug 17, 2026 20:514,76018,711,6601,904,000090,112stderr
11Sep 5, 2026 02:375,03011,519,4622,012,000090,112stderr
12Sep 5, 2026 02:375,05511,564,5872,022,000090,112stderr