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 26, 2026 16:10Osnaga Octavian-AlexandruOsnaga Octavian-AlexandruScore: 1,375,305Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 26, 2026 16:111,364,537570,939,422418,047,000127,768,00077,824
2Jun 26, 2026 16:111,369,235578,915,802418,045,000129,649,00073,728
3Jun 26, 2026 16:111,374,067580,144,203418,248,000131,379,00065,536
4Jun 26, 2026 16:111,375,250582,725,921418,436,000131,664,00049,152
5Jun 26, 2026 16:111,375,305568,439,002418,527,000131,595,00057,344
6Jun 26, 2026 16:111,376,412582,694,708418,365,000132,200,00049,152
7Jun 26, 2026 16:111,387,677584,021,266418,533,000136,538,00020,480
8Jun 26, 2026 16:111,390,752598,573,543418,370,000137,931,00020,480
9Jun 26, 2026 16:111,396,492586,607,342418,435,000140,162,00020,480