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 listJul 27, 2025 21:40Aniruddha DebAniruddha DebScore: 856,275Success
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:45C#_user10.00CustomSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 27, 2025 21:40855,680363,815,597342,272,00002,408,448
2Jul 27, 2025 21:40855,768365,864,171342,307,00002,539,520
3Jul 27, 2025 21:40856,145370,427,750341,460,000998,0002,539,520
4Jul 27, 2025 21:40856,200370,081,585342,480,00002,416,640
5Jul 27, 2025 21:40856,275367,588,201342,510,00002,424,832
6Jul 27, 2025 21:40856,498365,734,213340,602,0001,997,0002,408,448
7Jul 27, 2025 21:40856,688366,192,951341,676,000999,0002,539,520
8Jul 27, 2025 21:40856,805363,283,313342,722,00002,277,376
9Jul 27, 2025 21:40856,875367,453,043341,751,000999,0002,277,376