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 16, 2026 12:15Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 00:54Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 02:37010,166,65301,954,0002,113,536expected "7", got "50 "
2Sep 5, 2026 02:3709,610,3061,607,00002,113,536expected "1118", got "255 "
3Sep 5, 2026 02:3709,932,7741,906,00002,113,536expected "1466", got "255 "
4Jun 16, 2026 12:172,1277,975,880851,00002,113,536
5Jun 16, 2026 12:172,2528,060,469901,00002,113,536
6Jun 16, 2026 12:172,2928,035,742917,00002,113,536
7Jun 16, 2026 12:172,5128,157,8901,005,00002,113,536
8Jun 16, 2026 12:172,5778,073,6601,031,00002,113,536
9Jun 16, 2026 12:173,7808,685,6041,512,00002,113,536
10Jun 16, 2026 12:179,00710,704,4723,603,00002,113,536
11Jun 16, 2026 12:1720,58515,402,7778,234,00002,113,536
12Jun 16, 2026 12:1729,40018,728,19011,760,00002,113,536