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 26, 2025 18:42KeefeKeefeScore: 82,190Success
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 08:24C#_user10.00CustomSolution Held
Sep 5, 2026 11:03C#_user10.00CustomSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 26, 2025 18:4281,36857,349,95131,530,0001,017,0002,273,280
2May 26, 2025 18:4281,79557,589,99530,736,0001,982,0002,273,280
3May 26, 2025 18:4281,93057,314,48131,748,0001,024,0002,273,280
4May 26, 2025 18:4282,13058,206,90532,852,00002,375,680
5May 26, 2025 18:4282,19060,834,32430,884,0001,992,0002,498,560
6May 26, 2025 18:4282,21859,992,59731,891,000996,0002,273,280
7May 26, 2025 18:4282,24061,767,02932,896,00002,273,280
8May 26, 2025 18:4282,24558,970,63732,898,00002,273,280
9May 26, 2025 18:4282,31863,008,74030,932,0001,995,0002,383,872