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 16:51Aleksei ShahoikaAleksei ShahoikaScore: 23,670Success
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 16:5221,20223,467,5937,402,0001,079,0002,367,488
2May 9, 2026 16:5221,39225,916,4457,489,0001,068,0002,367,488
3May 9, 2026 16:5223,48025,109,6728,263,0001,129,0002,359,296
4May 9, 2026 16:5223,54724,765,7208,353,0001,066,0002,363,392
5May 9, 2026 16:5223,67025,715,2898,376,0001,092,0002,359,296
6May 9, 2026 16:5223,73225,672,7478,429,0001,064,0002,363,392
7May 9, 2026 16:5223,81227,306,9018,429,0001,096,0002,363,392
8May 9, 2026 16:5223,88525,349,1118,410,0001,144,0002,367,488
9May 9, 2026 16:5223,94227,070,5768,448,0001,129,0002,367,488