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 27, 2025 02:11zielajzielajScore: 36,498Success
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 15:11C#_user10.00CustomSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 27, 2025 02:1136,34536,066,63314,538,00002,502,656
2May 27, 2025 02:1136,39528,014,01413,519,0001,039,0002,531,328
3May 27, 2025 02:1136,43339,125,75614,573,00002,412,544
4May 27, 2025 02:1136,43834,968,43414,575,00002,269,184
5May 27, 2025 02:1136,49829,845,10014,599,00002,531,328
6May 27, 2025 02:1136,58329,599,79113,588,0001,045,0002,531,328
7May 27, 2025 02:1136,59531,721,54714,638,00002,531,328
8May 27, 2025 02:1136,71330,362,27514,685,00002,531,328
9May 27, 2025 02:1136,73539,755,38514,694,00002,269,184