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 listJun 21, 2026 18:25A_ShamanA_ShamanScore: 1,064,070Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 21, 2026 18:261,061,865433,942,253377,809,00046,937,0002,113,536
2Jun 21, 2026 18:261,063,460434,651,401378,696,00046,688,0002,113,536
3Jun 21, 2026 18:261,063,732434,895,408378,022,00047,471,0002,113,536
4Jun 21, 2026 18:261,063,927434,860,204378,215,00047,356,0002,113,536
5Jun 21, 2026 18:261,064,070434,836,342378,171,00047,457,0002,113,536
6Jun 21, 2026 18:261,064,235434,988,249378,143,00047,551,0002,113,536
7Jun 21, 2026 18:261,064,935435,498,550378,434,00047,540,0002,113,536
8Jun 21, 2026 18:261,065,362435,348,180378,038,00048,107,0002,113,536
9Jun 21, 2026 18:261,065,945435,620,885378,012,00048,366,0002,113,536