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 listMay 20, 2026 18:00M-RochatM-RochatScore: 13,052Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 20, 2026 18:0212,81216,372,2453,806,0001,319,0002,121,728
2May 20, 2026 18:0212,87014,654,4103,825,0001,323,0002,121,728
3May 20, 2026 18:0212,92215,597,1453,842,0001,327,0002,121,728
4May 20, 2026 18:0213,03715,094,9403,929,0001,286,0002,121,728
5May 20, 2026 18:0213,05215,282,6464,147,0001,074,0002,121,728
6May 20, 2026 18:0213,10216,428,9913,943,0001,298,0002,121,728
7May 20, 2026 18:0213,15516,621,7163,952,0001,310,0002,121,728
8May 20, 2026 18:0213,21215,627,3413,979,0001,306,0002,121,728
9May 20, 2026 18:0213,36715,058,0524,296,0001,051,0002,121,728