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 27, 2026 19:46TudyMTudyMScore: 174,232Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2026 19:47170,84284,065,61161,303,0007,034,0002,310,144
2Apr 27, 2026 19:47171,04086,148,26764,332,0004,084,0002,318,336
3Apr 27, 2026 19:47171,65586,523,66163,614,0005,048,0002,310,144
4Apr 27, 2026 19:47173,74089,229,39963,453,0006,043,0002,318,336
5Apr 27, 2026 19:47174,23282,339,04663,633,0006,060,0002,306,048
6Apr 27, 2026 19:47174,94287,844,90464,979,0004,998,0002,330,624
7Apr 27, 2026 19:47175,48586,969,43162,172,0008,022,0002,314,240
8Apr 27, 2026 19:47176,31285,719,04865,488,0005,037,0002,330,624
9Apr 27, 2026 19:47181,55091,659,47265,560,0007,060,0002,314,240