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:13Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 20:56Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 21:1209,658,1091,534,000069,632expected "2", got "50 "stderr
2Aug 17, 2026 20:163,2559,458,4811,302,0000106,496stderr
3Aug 17, 2026 20:163,4109,472,0591,364,000069,632stderr
4Sep 4, 2026 21:123,4709,651,1111,388,000073,728stderr
5Aug 17, 2026 20:163,6059,584,3431,442,000053,248stderr
6Aug 17, 2026 20:163,6329,624,6401,453,0000106,496stderr
7Aug 17, 2026 20:163,7829,705,9441,513,000069,632stderr
8Aug 17, 2026 20:163,7859,626,9831,514,0000106,496stderr
9Aug 17, 2026 20:163,8059,727,1111,522,0000106,496stderr
10Aug 17, 2026 20:163,83010,989,7951,532,0000106,496stderr
11Aug 17, 2026 20:163,8729,712,4101,549,0000106,496stderr
12Sep 4, 2026 21:123,9129,732,4211,565,0000106,496stderr