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:33A_ShamanA_ShamanScore: 509,782Success
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:34509,162213,056,185182,940,00020,725,0002,113,536
2Jul 2, 2026 11:34509,255213,053,584183,070,00020,632,0002,113,536
3Jul 2, 2026 11:34509,462213,171,550182,955,00020,830,0002,113,536
4Jul 2, 2026 11:34509,537213,139,461183,046,00020,769,0002,113,536
5Jul 2, 2026 11:34509,782213,351,447183,100,00020,813,0002,113,536
6Jul 2, 2026 11:34509,787213,268,337183,012,00020,903,0002,113,536
7Jul 2, 2026 11:34509,855213,226,142183,019,00020,923,0002,113,536
8Jul 2, 2026 11:34509,940213,274,903183,033,00020,943,0002,113,536
9Jul 2, 2026 11:34510,157213,402,166183,044,00021,019,0002,113,536