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

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 14:21Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 15:5509,130,537995,000028,672expected "2", got "50 "stderr
2Sep 4, 2026 15:5509,101,338987,000028,672expected "2", got "50 "stderr
3Sep 4, 2026 15:5508,817,819993,000028,672expected "2", got "50 "stderr
4Aug 18, 2026 13:231,9658,849,583786,000028,672stderr
5Aug 18, 2026 13:232,0079,217,694803,000028,672stderr
6Aug 18, 2026 13:232,1108,827,249844,000028,672stderr
7Aug 18, 2026 13:232,1258,737,921850,000028,672stderr
8Aug 18, 2026 13:232,3079,108,998923,000028,672stderr
9Aug 18, 2026 13:232,5279,368,8321,011,000028,672stderr
10Aug 18, 2026 13:232,5529,075,8111,021,000028,672stderr
11Aug 18, 2026 13:232,5729,187,2551,029,000028,672stderr
12Aug 18, 2026 13:232,61016,218,7611,044,000028,672stderr