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 22, 2026 06:52olliecrowolliecrowScore: 10,685Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 22, 2026 06:5410,23020,209,6222,046,0002,046,0002,547,712
2Apr 22, 2026 06:5410,54021,918,9083,162,0001,054,0002,555,904
3Apr 22, 2026 06:5410,57021,989,4083,171,0001,057,0002,535,424
4Apr 22, 2026 06:5410,68523,421,6892,137,0002,137,0002,543,616
5Apr 22, 2026 06:5410,68516,024,8653,206,0001,068,0002,551,808
6Apr 22, 2026 06:5410,71519,014,7992,143,0002,143,0002,543,616
7Apr 22, 2026 06:5411,13221,044,9923,340,0001,113,0002,551,808
8Apr 22, 2026 06:5411,46021,368,0642,292,0002,292,0002,334,720
9Apr 22, 2026 06:5411,80224,567,078944,0003,777,0002,523,136