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 09:37Dominique GarmierDominique GarmierScore: 28,007Success
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 09:3827,84527,279,5019,113,0002,025,0002,351,104
2May 1, 2026 09:3827,86029,515,5879,118,0002,026,0002,351,104
3May 1, 2026 09:3827,89229,135,7879,129,0002,028,0002,363,392
4May 1, 2026 09:3827,97028,681,93410,171,0001,017,0002,355,200
5May 1, 2026 09:3828,00728,367,25310,185,0001,018,0002,355,200
6May 1, 2026 09:3828,17026,556,98910,244,0001,024,0002,326,528
7May 1, 2026 09:3828,18230,349,36810,249,0001,024,0002,351,104
8May 1, 2026 09:3828,27726,231,09610,283,0001,028,0002,428,928
9May 1, 2026 09:3828,39730,277,16310,327,0001,032,0002,367,488