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 22, 2026 13:40BenBenScore: 1,102,185Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 22, 2026 13:411,101,822460,544,008438,731,0001,998,0002,490,368
2Apr 22, 2026 13:411,101,837458,037,488438,737,0001,998,0002,338,816
3Apr 22, 2026 13:411,101,905456,545,103439,763,000999,0002,334,720
4Apr 22, 2026 13:411,102,182456,659,033438,874,0001,999,0002,486,272
5Apr 22, 2026 13:411,102,185459,083,823438,875,0001,999,0002,322,432
6Apr 22, 2026 13:411,102,410456,362,807438,965,0001,999,0002,486,272
7Apr 22, 2026 13:411,102,432459,387,125438,974,0001,999,0002,494,464
8Apr 22, 2026 13:411,102,522460,235,848439,009,0002,000,0002,478,080
9Apr 22, 2026 13:411,102,930460,119,886440,172,0001,000,0002,486,272