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:19Dominique GarmierDominique GarmierScore: 28,770Success
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:2025,12024,165,1238,852,0001,196,0002,510,848
2May 6, 2026 16:2025,28528,413,1528,870,0001,244,0002,519,040
3May 6, 2026 16:2026,69725,968,2519,464,0001,215,0002,506,752
4May 6, 2026 16:2027,80527,850,8899,880,0001,242,0002,502,656
5May 6, 2026 16:2028,77026,269,73710,331,0001,177,0002,510,848
6May 6, 2026 16:2028,82528,301,81710,292,0001,238,0002,510,848
7May 6, 2026 16:2028,90031,809,15810,334,0001,226,0002,514,944
8May 6, 2026 16:2029,18230,939,81810,426,0001,247,0002,506,752
9May 6, 2026 16:2029,20529,983,95810,448,0001,234,0002,506,752