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 listJul 2, 2026 11:25A_ShamanA_ShamanScore: 1,121,740Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 2, 2026 11:261,121,545457,949,619447,577,0001,041,0002,113,536
2Jul 2, 2026 11:261,121,597457,940,810447,625,0001,014,0002,113,536
3Jul 2, 2026 11:261,121,662458,050,459447,640,0001,025,0002,113,536
4Jul 2, 2026 11:261,121,687457,995,924447,647,0001,028,0002,113,536
5Jul 2, 2026 11:261,121,740458,033,887447,691,0001,005,0002,113,536
6Jul 2, 2026 11:261,121,810458,077,288447,712,0001,012,0002,113,536
7Jul 2, 2026 11:261,121,830458,614,673447,722,0001,010,0002,113,536
8Jul 2, 2026 11:261,121,852458,017,508447,681,0001,060,0002,113,536
9Jul 2, 2026 11:261,121,977458,129,769447,751,0001,040,0002,113,536