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 6, 2026 16:03Dominique GarmierDominique GarmierScore: 47,820Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 6, 2026 16:0444,36534,331,20513,405,0004,341,0002,502,656stderr
2May 6, 2026 16:0446,59234,857,29214,332,0004,305,0002,510,848stderr
3May 6, 2026 16:0447,14535,422,85314,521,0004,337,0002,494,464stderr
4May 6, 2026 16:0447,32535,666,56414,625,0004,305,0002,514,944stderr
5May 6, 2026 16:0447,82034,039,43314,800,0004,328,0002,510,848stderr
6May 6, 2026 16:0447,82533,904,48214,831,0004,299,0002,510,848stderr
7May 6, 2026 16:0447,89236,065,26214,834,0004,323,0002,510,848stderr
8May 6, 2026 16:0447,90036,139,64314,015,0005,145,0002,510,848stderr
9May 6, 2026 16:0448,49734,383,26715,059,0004,340,0002,502,656stderr