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 listJun 5, 2026 01:50Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 01:46Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 03:30012,358,4743,467,00002,113,536expected "1502", got "255 "
2Sep 5, 2026 03:30010,338,6231,558,00002,113,536expected "2", got "50 "
3Sep 5, 2026 03:30011,970,6543,093,00002,113,536expected "1340", got "255 "
4Jun 5, 2026 01:511,8058,043,678722,00002,113,536
5Jun 5, 2026 01:511,9158,036,912766,00002,113,536
6Jun 5, 2026 01:512,2608,211,385904,00002,113,536
7Jun 5, 2026 01:512,4878,391,870995,00002,113,536
8Jun 5, 2026 01:513,4008,724,5421,360,00002,113,536
9Jun 5, 2026 01:514,2279,168,5871,691,00002,113,536
10Jun 5, 2026 01:514,9909,442,4831,996,00002,113,536
11Jun 5, 2026 01:515,3079,496,9692,123,00002,113,536
12Jun 5, 2026 01:515,3479,546,1292,139,00002,113,536