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:27A_ShamanA_ShamanScore: 1,057,922Success
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:281,054,382431,094,215375,215,00046,538,0002,113,536
2Jun 21, 2026 18:281,055,525431,371,913374,831,00047,379,0002,113,536
3Jun 21, 2026 18:281,055,757431,519,772375,449,00046,854,0002,113,536
4Jun 21, 2026 18:281,056,225433,046,267375,068,00047,422,0002,113,536
5Jun 21, 2026 18:281,057,922432,702,752375,963,00047,206,0002,113,536
6Jun 21, 2026 18:281,059,672433,136,680375,548,00048,321,0002,113,536
7Jun 21, 2026 18:281,060,437433,408,025375,512,00048,663,0002,113,536
8Jun 21, 2026 18:281,061,585433,934,885377,500,00047,134,0002,113,536
9Jun 21, 2026 18:281,069,102436,891,792380,375,00047,266,0002,113,536