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 listMay 1, 2026 08:56Dominique GarmierDominique GarmierScore: 826,417Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 1, 2026 08:57467,687204,125,531184,074,0003,001,0002,482,176
2May 1, 2026 08:57788,280330,645,346310,308,0005,004,0002,355,200
3May 1, 2026 08:57791,077331,472,666309,422,0007,009,0002,490,368
4May 1, 2026 08:57801,640336,738,923313,664,0006,992,0002,469,888
5May 1, 2026 08:57826,417349,380,073326,573,0003,994,0002,473,984
6May 1, 2026 08:57835,377351,775,769328,149,0006,002,0002,482,176
7May 1, 2026 08:57858,145362,854,596337,254,0006,004,0002,478,080
8May 1, 2026 08:57955,827402,426,016377,327,0005,004,0002,486,272
9May 1, 2026 08:571,011,312421,815,517397,499,0007,026,0002,486,272