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 listFeb 21, 2026 02:22olliecrowolliecrowScore: 353,028Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 21, 2026 02:22352,353166,348,312137,943,0002,998,0002,494,464
2Feb 21, 2026 02:22352,390168,784,542134,958,0005,998,0002,326,528
3Feb 21, 2026 02:22352,778161,715,912134,106,0007,005,0002,371,584
4Feb 21, 2026 02:22353,018169,173,334136,200,0005,007,0002,383,872
5Feb 21, 2026 02:22353,028168,922,773137,205,0004,006,0002,351,104
6Feb 21, 2026 02:22353,258167,743,693136,293,0005,010,0002,318,336
7Feb 21, 2026 02:22353,635167,489,178133,429,0008,025,0002,342,912
8Feb 21, 2026 02:22390,780182,024,399150,300,0006,012,0002,519,040
9Feb 21, 2026 02:22479,775216,897,548185,913,0005,997,0002,387,968