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:26TudyMTudyMScore: 96,597Success
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:2895,04256,526,97130,014,0008,003,0002,318,336
2Apr 26, 2026 21:2895,41255,763,46733,144,0005,021,0002,314,240
3Apr 26, 2026 21:2895,79759,708,63032,269,0006,050,0002,322,432
4Apr 26, 2026 21:2896,53259,949,41432,352,0006,261,0002,314,240
5Apr 26, 2026 21:2896,59758,989,81732,538,0006,101,0002,310,144
6Apr 26, 2026 21:2898,79255,607,10135,464,0004,053,0002,310,144
7Apr 26, 2026 21:2899,61758,103,53131,878,0007,969,0002,330,624
8Apr 26, 2026 21:28101,73058,998,66635,606,0005,086,0002,428,928
9Apr 26, 2026 21:28102,10756,934,61534,866,0005,977,0002,322,432