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 listApr 20, 2026 20:22Charles CabergsCharles CabergsScore: 1,882,695Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 20, 2026 20:251,881,805775,589,709750,723,0001,999,0002,486,272
2Apr 20, 2026 20:251,882,100777,694,656749,841,0002,999,0002,486,272
3Apr 20, 2026 20:251,882,430775,623,087751,973,000999,0002,260,992
4Apr 20, 2026 20:251,882,545776,217,862751,018,0002,000,0002,486,272
5Apr 20, 2026 20:251,882,695778,679,658751,078,0002,000,0002,482,176
6Apr 20, 2026 20:251,882,782778,530,592752,113,0001,000,0002,260,992
7Apr 20, 2026 20:251,883,462781,188,975751,387,0001,998,0002,277,376
8Apr 20, 2026 20:251,883,622784,585,386751,451,0001,998,0002,482,176
9Apr 20, 2026 20:251,884,072782,502,878751,630,0001,999,0002,490,368