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:29TudyMTudyMScore: 100,290Success
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:3195,42761,325,58433,149,0005,022,0002,301,952
2Apr 26, 2026 21:3196,72061,121,05833,598,0005,090,0002,543,616
3Apr 26, 2026 21:3196,96252,622,00832,818,0005,967,0002,297,856
4Apr 26, 2026 21:31100,25259,300,62533,084,0007,017,0002,310,144
5Apr 26, 2026 21:31100,29058,897,23134,099,0006,017,0002,306,048
6Apr 26, 2026 21:31100,29259,185,26634,100,0006,017,0002,318,336
7Apr 26, 2026 21:31101,40262,604,90434,477,0006,084,0002,306,048
8Apr 26, 2026 21:31102,74764,340,66537,090,0004,009,0002,310,144
9Apr 26, 2026 21:31102,91555,336,39234,138,0007,028,0002,424,832