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 listMay 6, 2026 07:52olliecrowolliecrowError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 11:10C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 11:1009,169,815970,00002,117,632expected "300", got "51"
2Sep 5, 2026 11:1009,215,446961,00002,117,632expected "300", got "51"
3Sep 5, 2026 11:1009,086,243967,00002,117,632expected "300", got "51"
4May 6, 2026 07:534,01218,316,3051,605,00002,469,888
5May 6, 2026 07:534,02715,398,1691,611,00002,465,792
6May 6, 2026 07:534,04518,032,2621,618,00002,461,696
7May 6, 2026 07:534,43518,901,8461,774,00002,465,792
8May 6, 2026 07:534,76215,299,1451,905,00002,461,696
9May 6, 2026 07:536,06217,512,0932,425,00002,457,600
10May 6, 2026 07:536,28019,226,3702,512,00002,469,888
11May 6, 2026 07:536,29516,880,6872,518,00002,465,792
12May 6, 2026 07:536,93017,682,9092,772,00002,457,600