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 listMay 9, 2026 16:16Aleksei ShahoikaAleksei ShahoikaScore: 443,125Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 16:17443,000196,645,775176,194,0001,006,0002,523,136
2May 9, 2026 16:17443,032194,124,278176,192,0001,021,0002,523,136
3May 9, 2026 16:17443,057195,879,263176,195,0001,028,0002,519,040
4May 9, 2026 16:17443,117196,059,898176,224,0001,023,0002,514,944
5May 9, 2026 16:17443,125195,448,008176,193,0001,057,0002,510,848
6May 9, 2026 16:17443,145194,373,578176,220,0001,038,0002,506,752
7May 9, 2026 16:17443,152193,632,107176,230,0001,031,0002,514,944
8May 9, 2026 16:17443,282194,365,780176,190,0001,123,0002,523,136
9May 9, 2026 16:17443,390192,721,753176,242,0001,114,0002,506,752