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:22TudyMTudyMScore: 99,207Success
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:2392,11752,108,33329,876,0006,971,0002,338,816
2Apr 26, 2026 21:2393,33557,465,23733,298,0004,036,0002,498,560
3Apr 26, 2026 21:2395,70756,178,54532,239,0006,044,0002,523,136
4Apr 26, 2026 21:2397,22254,809,81831,909,0006,980,0002,519,040
5Apr 26, 2026 21:2399,20755,090,10835,613,0004,070,0002,510,848
6Apr 26, 2026 21:2399,55055,685,06430,861,0008,959,0002,510,848
7Apr 26, 2026 21:23100,63061,425,07634,215,0006,037,0002,502,656
8Apr 26, 2026 21:23100,80757,178,75636,291,0004,032,0002,502,656
9Apr 26, 2026 21:23102,06560,256,80434,702,0006,124,0002,519,040