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 listApr 23, 2026 03:24Charles CabergsCharles CabergsScore: 163,427Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 23, 2026 03:26162,39282,119,72032,978,00031,979,0002,535,424
2Apr 23, 2026 03:26162,95582,881,61029,081,00036,101,0002,535,424
3Apr 23, 2026 03:26163,22280,113,83130,133,00035,156,0002,531,328
4Apr 23, 2026 03:26163,31282,613,81827,135,00038,190,0002,535,424
5Apr 23, 2026 03:26163,42781,908,92134,194,00031,177,0002,527,232
6Apr 23, 2026 03:26163,65081,467,08632,226,00033,234,0002,543,616
7Apr 23, 2026 03:26163,87082,423,17428,236,00037,312,0002,535,424
8Apr 23, 2026 03:26164,52287,311,59527,919,00037,890,0002,543,616
9Apr 23, 2026 03:26194,20297,344,65134,857,00042,824,0002,539,520