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:20E SequeiraE SequeiraScore: 645,587Success
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:21645,400272,931,453257,120,0001,040,0002,314,240
2May 9, 2026 14:21645,430275,683,297257,141,0001,031,0002,330,624
3May 9, 2026 14:21645,507274,645,277257,159,0001,044,0002,318,336
4May 9, 2026 14:21645,577273,486,716257,148,0001,083,0002,318,336
5May 9, 2026 14:21645,587273,172,011257,228,0001,007,0002,314,240
6May 9, 2026 14:21645,607276,870,994257,235,0001,008,0002,314,240
7May 9, 2026 14:21645,635274,596,192257,222,0001,032,0002,322,432
8May 9, 2026 14:21645,747275,025,041257,233,0001,066,0002,322,432
9May 9, 2026 14:21645,795275,271,373257,211,0001,107,0002,318,336