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 9, 2026 19:30Aleksei ShahoikaAleksei ShahoikaScore: 24,205Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 19:3121,15023,359,8637,379,0001,081,0002,367,488
2May 9, 2026 19:3122,41226,110,2197,894,0001,071,0002,367,488
3May 9, 2026 19:3122,66523,864,4477,940,0001,126,0002,367,488
4May 9, 2026 19:3124,04726,771,3308,492,0001,127,0002,359,296
5May 9, 2026 19:3124,20524,822,4398,604,0001,078,0002,355,200
6May 9, 2026 19:3124,37228,123,0638,578,0001,171,0002,363,392
7May 9, 2026 19:3124,44525,460,5328,607,0001,171,0002,359,296
8May 9, 2026 19:3124,50029,021,5068,637,0001,163,0002,359,296
9May 9, 2026 19:3124,61525,808,6578,766,0001,080,0002,359,296