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 19, 2026 07:50Charles CabergsCharles CabergsScore: 275,983Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 19, 2026 07:50273,105136,320,23549,109,00060,133,0002,490,368
2Apr 19, 2026 07:50274,480146,451,88853,898,00055,894,0002,367,488
3Apr 19, 2026 07:50275,158137,483,02564,037,00046,026,0002,498,560
4Apr 19, 2026 07:50275,660134,158,87443,103,00067,161,0002,334,720
5Apr 19, 2026 07:50275,983136,142,74437,132,00073,261,0002,277,376
6Apr 19, 2026 07:50276,123133,029,30260,245,00050,204,0002,494,464
7Apr 19, 2026 07:50277,153139,251,81953,932,00056,929,0002,486,272
8Apr 19, 2026 07:50278,143139,028,12360,139,00051,118,0002,494,464
9Apr 19, 2026 07:50278,153137,157,62046,108,00065,153,0002,281,472