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 23, 2026 11:19Dominique GarmierDominique GarmierScore: 27,700Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 23, 2026 11:2027,41726,747,5318,973,0001,994,0002,338,816
2Apr 23, 2026 11:2027,45029,137,4298,984,0001,996,0002,510,848
3Apr 23, 2026 11:2027,45724,701,9578,986,0001,997,0002,342,912
4Apr 23, 2026 11:2027,61227,424,4999,037,0002,008,0002,506,752
5Apr 23, 2026 11:2027,70033,231,7449,066,0002,014,0002,519,040
6Apr 23, 2026 11:2027,83731,819,3619,111,0002,024,0002,510,848
7Apr 23, 2026 11:2027,89531,075,2809,130,0002,028,0002,514,944
8Apr 23, 2026 11:2027,93229,810,1559,142,0002,031,0002,510,848
9Apr 23, 2026 11:2027,99731,601,1069,163,0002,036,0002,519,040