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 2, 2025 11:46KeefeKeefeError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 11:00C#_user24.27CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 11:00015,660,6494,663,0001,053,0002,117,632expected "300", got "80 "
2Sep 5, 2026 11:00015,676,0094,688,0001,040,0002,117,632expected "300", got "80 "
3Sep 5, 2026 11:00015,612,6664,685,0001,025,0002,117,632expected "300", got "80 "
4Jun 2, 2025 11:4726,60032,478,42510,640,00002,273,280
5Jun 2, 2025 11:4727,27028,156,85810,908,00002,392,064
6Jun 2, 2025 11:4627,33529,805,5228,946,0001,988,0002,273,280
7Jun 2, 2025 11:4627,44830,490,0049,981,000998,0002,273,280
8Jun 2, 2025 11:4727,57028,494,67411,028,00002,273,280
9Jun 2, 2025 11:4627,63331,752,3639,044,0002,009,0002,273,280