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 22, 2026 21:24M-RochatM-RochatScore: 14,025Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 22, 2026 21:2613,64214,740,6324,365,0001,092,0002,121,728
2May 22, 2026 21:2613,80514,892,3304,442,0001,080,0002,121,728
3May 22, 2026 21:2613,80714,926,4904,438,0001,085,0002,121,728
4May 22, 2026 21:2613,87515,414,8974,478,0001,072,0002,121,728
5May 22, 2026 21:2614,02515,416,6434,540,0001,070,0002,121,728
6May 22, 2026 21:2615,84715,798,3845,244,0001,095,0002,121,728
7May 22, 2026 21:2615,93517,338,3235,304,0001,070,0002,121,728
8May 22, 2026 21:2616,18718,389,9565,290,0001,185,0002,121,728
9May 22, 2026 21:2616,53516,874,1945,274,0001,340,0002,121,728