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 listMar 14, 2026 11:36Dominique GarmierDominique GarmierScore: 840,328Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 14, 2026 11:36839,900360,187,477335,960,00002,498,560
2Mar 14, 2026 11:36840,193364,469,846335,077,0001,000,0002,490,368
3Mar 14, 2026 11:36840,233362,784,538334,093,0002,000,0002,285,568
4Mar 14, 2026 11:36840,295362,258,594334,118,0002,000,0002,289,664
5Mar 14, 2026 11:36840,328362,670,551335,131,0001,000,0002,285,568
6Mar 14, 2026 11:36840,465362,158,445335,186,0001,000,0002,498,560
7Mar 14, 2026 11:36840,533364,197,098334,212,0002,001,0002,502,656
8Mar 14, 2026 11:36840,623361,230,887335,249,0001,000,0002,289,664
9Mar 14, 2026 11:36840,723365,075,075335,289,0001,000,0002,486,272