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 26, 2026 16:04Osnaga Octavian-AlexandruOsnaga Octavian-AlexandruScore: 1,374,537Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 26, 2026 16:051,365,882572,763,951418,667,000127,686,00065,536
2Jun 26, 2026 16:051,367,162568,232,830418,918,000127,947,00077,824
3Jun 26, 2026 16:051,371,285577,504,194418,484,000130,030,00065,536
4Jun 26, 2026 16:051,373,117576,885,641418,556,000130,691,00028,672
5Jun 26, 2026 16:051,374,537573,461,131418,423,000131,392,00061,440
6Jun 26, 2026 16:051,379,955593,453,231418,587,000133,395,00040,960
7Jun 26, 2026 16:051,389,142574,616,714418,500,000137,157,00020,480
8Jun 26, 2026 16:051,389,717584,760,769418,353,000137,534,00020,480
9Jun 26, 2026 16:051,392,820586,139,034418,983,000138,145,00020,480