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:23Osnaga Octavian-AlexandruOsnaga Octavian-AlexandruScore: 1,340,242Success
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:241,330,820579,353,256403,994,000128,334,00073,728
2Jun 26, 2026 16:241,331,945581,917,470404,430,000128,348,00069,632
3Jun 26, 2026 16:241,334,687560,862,661404,351,000129,524,00045,056
4Jun 26, 2026 16:241,335,430554,783,116404,812,000129,360,00077,824
5Jun 26, 2026 16:241,340,242565,618,024404,335,000131,762,00077,824
6Jun 26, 2026 16:241,350,245567,646,495403,628,000136,470,00073,728
7Jun 26, 2026 16:241,351,135567,874,764404,569,000135,885,00020,480
8Jun 26, 2026 16:241,355,657570,793,805404,940,000137,323,00020,480
9Jun 26, 2026 16:241,365,165562,931,773404,376,000141,690,00020,480