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 9, 2026 19:18E SequeiraE SequeiraScore: 1,387,315Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 19:201,385,990585,725,656427,256,000127,140,000471,040
2May 9, 2026 19:201,386,650584,160,743427,132,000127,528,000487,424
3May 9, 2026 19:201,386,947591,375,190427,232,000127,547,000430,080
4May 9, 2026 19:201,387,122604,866,077427,135,000127,714,000430,080
5May 9, 2026 19:201,387,315611,110,127426,927,000127,999,000430,080
6May 9, 2026 19:201,389,797599,492,538426,993,000128,926,000618,496
7May 9, 2026 19:201,389,932593,388,511427,144,000128,829,000430,080
8May 9, 2026 19:201,392,020584,110,121427,367,000129,441,000430,080
9May 9, 2026 19:201,392,990595,418,099426,820,000130,376,000745,472