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 20, 2026 14:17Dominique GarmierDominique GarmierScore: 47,132Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 20, 2026 14:2032,85027,606,60811,119,0002,021,0002,285,568
2Apr 20, 2026 14:2035,18232,920,74412,063,0002,010,0002,490,368
3Apr 20, 2026 14:2041,09035,181,55514,382,0002,054,0002,269,184
4Apr 20, 2026 14:2046,21038,853,53117,458,0001,026,0002,285,568
5Apr 20, 2026 14:2047,13249,207,57216,869,0001,984,0002,494,464
6Apr 20, 2026 14:2047,51532,528,07817,006,0002,000,0002,498,560
7Apr 20, 2026 14:2049,66736,708,81017,881,0001,986,0002,494,464
8Apr 20, 2026 14:2049,70049,444,68518,886,000994,0002,490,368
9Apr 20, 2026 14:2050,60750,196,84018,219,0002,024,0002,490,368