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 24, 2026 08:20Dominique GarmierDominique GarmierScore: 31,935Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 24, 2026 08:2130,10729,357,84310,036,0002,007,0002,506,752
2Apr 24, 2026 08:2131,63228,633,65111,599,0001,054,0002,519,040
3Apr 24, 2026 08:2131,86730,959,69510,623,0002,124,0002,506,752
4Apr 24, 2026 08:2131,87727,189,11410,790,0001,961,0002,514,944
5Apr 24, 2026 08:2131,93530,923,20611,710,0001,064,0002,498,560
6Apr 24, 2026 08:2132,00029,624,66410,831,0001,969,0002,514,944
7Apr 24, 2026 08:2132,21027,648,57010,902,0001,982,0002,519,040
8Apr 24, 2026 08:2132,35534,628,44110,951,0001,991,0002,506,752
9Apr 24, 2026 08:2132,50732,229,03311,003,0002,000,0002,502,656