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 22:58M-RochatM-RochatError
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 23:05014,836,6664,745,0001,185,0002,121,728expected "50", got "49 "
2May 16, 2026 23:0515,03015,907,4604,812,0001,200,0002,121,728
3May 16, 2026 23:0515,04715,783,3974,817,0001,202,0002,121,728
4May 16, 2026 23:0515,10515,982,5074,837,0001,205,0002,121,728
5May 16, 2026 23:0515,16215,953,3494,854,0001,211,0002,121,728
6May 16, 2026 23:0515,26718,137,0044,889,0001,218,0002,121,728
7May 16, 2026 23:0515,32216,667,3654,906,0001,223,0002,121,728
8May 16, 2026 23:0515,51516,326,2324,967,0001,239,0002,121,728
9May 16, 2026 23:0515,52715,933,8494,971,0001,240,0002,121,728