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 23, 2026 10:56Dominique GarmierDominique GarmierScore: 27,522Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 23, 2026 10:5724,31523,859,8208,646,0001,080,0002,514,944
2Apr 23, 2026 10:5724,48223,244,0108,705,0001,088,0002,514,944
3Apr 23, 2026 10:5726,51025,635,3309,544,0001,060,0002,519,040
4Apr 23, 2026 10:5727,04026,584,0648,850,0001,966,0002,510,848
5Apr 23, 2026 10:5727,52229,627,3209,008,0002,001,0002,506,752
6Apr 23, 2026 10:5727,59231,805,1689,031,0002,006,0002,514,944
7Apr 23, 2026 10:5727,61529,669,0669,038,0002,008,0002,502,656
8Apr 23, 2026 10:5727,68532,597,8979,061,0002,013,0002,510,848
9Apr 23, 2026 10:5728,35732,765,0099,281,0002,062,0002,510,848