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 9, 2026 14:30E SequeiraE SequeiraScore: 352,922Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 14:33352,827159,568,896140,105,0001,026,0002,338,816
2May 9, 2026 14:33352,862160,150,113140,114,0001,031,0002,318,336
3May 9, 2026 14:33352,885158,795,932140,114,0001,040,0002,326,528
4May 9, 2026 14:33352,892155,828,102140,114,0001,043,0002,322,432
5May 9, 2026 14:33352,922157,902,699140,122,0001,047,0002,322,432
6May 9, 2026 14:33353,117157,063,637140,188,0001,059,0002,330,624
7May 9, 2026 14:33353,180156,334,094140,208,0001,064,0002,322,432
8May 9, 2026 14:33353,187156,591,628140,210,0001,065,0002,330,624
9May 9, 2026 14:33353,275159,998,828140,241,0001,069,0002,326,528