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 listMar 12, 2026 03:15olliecrowolliecrowScore: 11,370Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 12, 2026 03:1511,08522,725,3143,326,0001,108,0002,473,984
2Mar 12, 2026 03:1511,17820,111,7584,471,00002,285,568
3Mar 12, 2026 03:1511,19821,975,2624,479,00002,371,584
4Mar 12, 2026 03:1511,36321,279,5723,409,0001,136,0002,473,984
5Mar 12, 2026 03:1511,37021,314,5643,411,0001,137,0002,355,200
6Mar 12, 2026 03:1511,37324,562,2174,549,00002,285,568
7Mar 12, 2026 03:1511,38020,711,1403,414,0001,138,0002,285,568
8Mar 12, 2026 03:1511,42819,962,8644,571,00002,285,568
9Mar 12, 2026 03:1511,45527,398,5533,437,0001,145,0002,285,568