Largest Square Submatrix of all 1's NoSIMD_C#

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 15, 2026 00:20zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
May 17, 2026 13:43M-Rochat35.52CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 14:0108,594,628883,00002,113,536expected "411", got "160 "
2May 17, 2026 14:0109,849,203822,00002,113,536expected "411", got "160 "
3May 17, 2026 14:01010,798,345853,00002,113,536expected "411", got "160 "
4May 15, 2026 00:212,0227,810,863809,00002,113,536
5May 15, 2026 00:212,0308,308,052812,00002,113,536
6May 15, 2026 00:212,0829,338,055833,00002,113,536
7May 15, 2026 00:212,1178,289,568847,00002,113,536
8May 15, 2026 00:212,1229,552,768849,00002,113,536
9May 15, 2026 00:212,1328,544,170853,00002,113,536
10May 15, 2026 00:212,3027,937,258921,00002,113,536
11May 15, 2026 00:212,3478,023,385939,00002,113,536
12May 15, 2026 00:212,3559,874,115942,00002,113,536