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 14:30E SequeiraE SequeiraScore: 273,950Success
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 14:31273,780128,790,439108,455,0001,057,0002,322,432
2May 9, 2026 14:31273,807126,768,361108,502,0001,021,0002,322,432
3May 9, 2026 14:31273,917126,471,829108,535,0001,032,0002,318,336
4May 9, 2026 14:31273,917128,770,314108,521,0001,046,0002,322,432
5May 9, 2026 14:31273,950126,549,192108,538,0001,042,0002,318,336
6May 9, 2026 14:31274,035126,047,791108,543,0001,071,0002,322,432
7May 9, 2026 14:31274,190126,699,590108,617,0001,059,0002,310,144
8May 9, 2026 14:31274,217125,538,042108,633,0001,054,0002,334,720
9May 9, 2026 14:31274,227127,993,443108,643,0001,048,0002,330,624