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 30, 2026 19:07Josu San MartinJosu San MartinScore: 25,585Success
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 15:23C#_user10.00CustomSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 30, 2026 19:0925,34218,343,82810,137,00002,117,632
2Aug 30, 2026 19:0925,44018,585,09510,176,00002,117,632
3Aug 30, 2026 19:0925,50718,534,97510,203,00002,117,632
4Aug 30, 2026 19:0925,51518,570,28210,206,00002,117,632
5Aug 30, 2026 19:0925,58518,598,18910,234,00002,117,632
6Aug 30, 2026 19:0925,64018,701,13410,256,00002,117,632
7Aug 30, 2026 19:0925,66518,775,17010,266,00002,117,632
8Aug 30, 2026 19:0925,76218,595,08510,305,00002,117,632
9Aug 30, 2026 19:0925,78218,723,4309,292,0001,021,0002,117,632