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 listApr 27, 2026 15:34Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 13:11Tomislav Tunkovic113.77CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 13:20013,700,26501,931,0002,121,728expected "2", got "50 "
2Apr 27, 2026 15:356,25020,322,4111,250,0001,250,0002,510,848
3Apr 27, 2026 15:356,28516,937,82102,514,0002,514,944
4Apr 27, 2026 15:356,41519,405,8741,283,0001,283,0002,519,040
5Apr 27, 2026 15:356,42519,918,2241,285,0001,285,0002,514,944
6Apr 27, 2026 15:358,59522,495,0242,292,0001,146,0002,514,944
7Apr 27, 2026 15:358,73018,769,1322,328,0001,164,0002,527,232
8Apr 27, 2026 15:358,87217,515,9032,366,0001,183,0002,338,816
9Apr 27, 2026 15:358,89720,698,9162,373,0001,186,0002,514,944
10Apr 27, 2026 15:358,94724,622,9062,386,0001,193,0002,523,136
11Sep 4, 2026 13:2015,22516,624,1595,006,0001,084,0002,121,728
12Sep 4, 2026 13:2016,52017,115,8385,412,0001,196,0002,121,728