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 27, 2026 03:25Charles CabergsCharles CabergsScore: 204,972Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 27, 2026 03:27192,28098,247,18056,935,00019,977,0002,514,944stderr
2Apr 27, 2026 03:27192,97793,544,00458,144,00019,047,0002,314,240stderr
3Apr 27, 2026 03:27200,09098,539,37361,028,00019,008,0002,555,904stderr
4Apr 27, 2026 03:27202,48098,664,74062,994,00017,998,0002,506,752stderr
5Apr 27, 2026 03:27204,97299,846,94558,992,00022,997,0002,523,136stderr
6Apr 27, 2026 03:27205,10098,628,91661,030,00021,010,0002,392,064stderr
7Apr 27, 2026 03:27206,00599,945,93166,324,00016,078,0002,506,752stderr
8Apr 27, 2026 03:27206,937100,908,92664,824,00017,951,0002,387,968stderr
9Apr 27, 2026 03:27214,585101,307,53967,869,00017,965,0002,342,912stderr