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 30, 2026 21:33Dominique GarmierDominique GarmierScore: 29,180Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 30, 2026 21:3425,82027,047,0979,296,0001,032,0002,506,752
2Apr 30, 2026 21:3428,43029,280,01710,339,0001,033,0002,510,848
3Apr 30, 2026 21:3428,93733,149,76710,523,0001,052,0002,506,752
4Apr 30, 2026 21:3429,10729,836,67710,585,0001,058,0002,510,848
5Apr 30, 2026 21:3429,18035,492,44410,611,0001,061,0002,519,040
6Apr 30, 2026 21:3429,26229,717,31310,641,0001,064,0002,514,944
7Apr 30, 2026 21:3429,45231,932,44110,710,0001,071,0002,514,944
8Apr 30, 2026 21:3429,50031,947,8209,834,0001,966,0002,519,040
9Apr 30, 2026 21:3429,89025,643,05310,960,000996,0002,342,912