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:01E SequeiraE SequeiraScore: 1,320,772Success
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:031,314,927566,223,218397,987,000127,984,000430,080
2May 9, 2026 14:031,316,447562,383,548398,170,000128,409,000466,944
3May 9, 2026 14:031,317,260572,169,656398,172,000128,732,000745,472
4May 9, 2026 14:031,318,132567,355,182398,063,000129,190,000442,368
5May 9, 2026 14:031,320,772559,657,742399,367,000128,942,000483,328
6May 9, 2026 14:031,324,032556,951,979398,902,000130,711,000430,080
7May 9, 2026 14:031,324,697561,072,427400,940,000128,939,000524,288
8May 9, 2026 14:031,325,882562,632,831398,109,000132,244,000430,080
9May 9, 2026 14:031,327,415557,579,796398,955,000132,011,000430,080