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 19:36olliecrowolliecrowScore: 4,940Success
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 19:374,67220,916,30901,869,0002,355,200
2Apr 23, 2026 19:374,74015,622,48701,896,0002,375,680
3Apr 23, 2026 19:374,89523,470,20301,958,0002,375,680
4Apr 23, 2026 19:374,91523,444,53301,966,0002,371,584
5Apr 23, 2026 19:374,94020,954,04001,976,0002,375,680
6Apr 23, 2026 19:375,34518,922,3651,069,0001,069,0002,363,392
7Apr 23, 2026 19:376,07519,092,1601,215,0001,215,0002,379,776
8Apr 23, 2026 19:376,24020,647,3511,248,0001,248,0002,363,392
9Apr 23, 2026 19:376,31520,700,0811,263,0001,263,0002,363,392