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 26, 2026 21:51TudyMTudyMScore: 99,745Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 26, 2026 21:5293,15056,584,14133,232,0004,028,0002,314,240
2Apr 26, 2026 21:5294,36753,871,04631,787,0005,960,0002,306,048
3Apr 26, 2026 21:5295,05058,263,24532,017,0006,003,0002,310,144
4Apr 26, 2026 21:5297,78759,687,00031,092,0008,023,0002,310,144
5Apr 26, 2026 21:5299,74559,252,33632,916,0006,982,0002,318,336
6Apr 26, 2026 21:5299,95256,840,45031,985,0007,996,0002,322,432
7Apr 26, 2026 21:52100,18761,923,66634,064,0006,011,0002,318,336
8Apr 26, 2026 21:52102,79556,892,61234,098,0007,020,0002,314,240
9Apr 26, 2026 21:52104,49058,087,44934,830,0006,966,0002,314,240