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 10, 2026 04:54E SequeiraE SequeiraScore: 30,570Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 10, 2026 04:5530,43033,537,99011,007,0001,165,0002,375,680
2May 10, 2026 04:5530,49230,915,82411,052,0001,145,0002,387,968
3May 10, 2026 04:5530,50226,859,57711,058,0001,143,0002,375,680
4May 10, 2026 04:5530,51529,741,55511,047,0001,159,0002,383,872
5May 10, 2026 04:5530,57029,345,12811,055,0001,173,0002,371,584
6May 10, 2026 04:5530,63029,571,89111,082,0001,170,0002,379,776
7May 10, 2026 04:5530,74230,597,88411,126,0001,171,0002,379,776
8May 10, 2026 04:5530,78726,357,34411,169,0001,146,0002,379,776
9May 10, 2026 04:5530,79531,013,19011,170,0001,148,0002,367,488