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 listJun 11, 2026 07:57Victor MerckléVictor MerckléScore: 5,887Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 11, 2026 08:014,93710,712,00701,975,0002,179,072
2Jun 11, 2026 08:015,44510,916,00602,178,0002,179,072
3Jun 11, 2026 08:015,63011,035,32202,252,0002,179,072
4Jun 11, 2026 08:015,77211,067,61402,309,0002,179,072
5Jun 11, 2026 08:015,88711,082,34502,355,0002,179,072
6Jun 11, 2026 08:015,91211,107,93802,365,0002,179,072
7Jun 11, 2026 08:015,94511,093,08302,378,0002,179,072
8Jun 11, 2026 08:015,99211,116,09702,397,0002,179,072
9Jun 11, 2026 08:016,14511,116,16402,458,0002,179,072