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

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 19:07Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 19:1509,545,9141,539,000081,920expected "7", got "50 "stderr
2Sep 4, 2026 19:1509,806,0891,541,000045,056expected "2", got "50 "stderr
3Aug 17, 2026 23:523,1509,249,1511,260,000081,920stderr
4Aug 17, 2026 23:523,3709,389,8171,348,000081,920stderr
5Aug 17, 2026 23:523,4679,422,0701,387,000081,920stderr
6Aug 17, 2026 23:523,4779,336,2951,391,000077,824stderr
7Aug 17, 2026 23:523,5479,397,4301,419,000045,056stderr
8Aug 17, 2026 23:523,5529,588,9841,421,000077,824stderr
9Aug 17, 2026 23:523,7809,536,1071,512,000077,824stderr
10Aug 17, 2026 23:523,8429,512,6041,537,000077,824stderr
11Aug 17, 2026 23:523,8479,501,3031,539,000077,824stderr
12Sep 4, 2026 19:154,29710,118,2831,719,000077,824stderr