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 29, 2025 11:54vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:51C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:51016,313,6408,004,00002,113,536expected "10000", got "255 "
2Sep 7, 2026 14:51016,421,5737,984,00002,113,536expected "10000", got "255 "
3Sep 7, 2026 14:51016,266,5798,000,00002,113,536expected "10000", got "255 "
4May 29, 2025 11:5420,93820,742,9358,375,00002,482,176
5May 29, 2025 11:5420,97523,848,6738,390,00002,478,080
6May 29, 2025 11:5420,97823,722,4998,391,00002,482,176
7May 29, 2025 11:5421,01825,598,7648,407,00002,273,280
8May 29, 2025 11:5421,06326,832,5728,425,00002,482,176
9May 29, 2025 11:5421,08021,798,6138,432,00002,469,888
10May 29, 2025 11:5421,09525,951,8428,438,00002,531,328
11May 29, 2025 11:5421,11027,443,1268,444,00002,273,280
12May 29, 2025 11:5421,11326,789,9528,445,00002,482,176