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 16, 2026 18:59M-RochatM-RochatScore: 15,950Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 16, 2026 19:0015,70515,352,8675,028,0001,254,0002,121,728
2May 16, 2026 19:0015,81017,030,6735,061,0001,263,0002,121,728
3May 16, 2026 19:0015,82516,560,7384,217,0002,113,0002,121,728
4May 16, 2026 19:0015,88517,153,2164,233,0002,121,0002,121,728
5May 16, 2026 19:0015,95016,923,3705,107,0001,273,0002,121,728
6May 16, 2026 19:0015,97218,058,1724,262,0002,127,0002,121,728
7May 16, 2026 19:0016,09518,155,5055,154,0001,284,0002,121,728
8May 16, 2026 19:0016,18218,571,8354,290,0002,183,0002,121,728
9May 16, 2026 19:0016,34016,199,7784,330,0002,206,0002,121,728