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 28, 2026 04:23Charles CabergsCharles CabergsScore: 95,940Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 28, 2026 04:2593,48254,896,80118,191,00019,202,0002,519,040stderr
2Apr 28, 2026 04:2594,81555,864,92618,963,00018,963,0002,359,296stderr
3Apr 28, 2026 04:2594,88057,411,29613,982,00023,970,0002,523,136stderr
4Apr 28, 2026 04:2595,27053,368,04219,054,00019,054,0002,510,848stderr
5Apr 28, 2026 04:2595,94053,073,53419,188,00019,188,0002,514,944stderr
6Apr 28, 2026 04:2598,49257,014,83621,214,00018,183,0002,514,944stderr
7Apr 28, 2026 04:25101,78057,673,05120,356,00020,356,0002,514,944stderr
8Apr 28, 2026 04:25102,47555,324,42016,996,00023,994,0002,506,752stderr
9Apr 28, 2026 04:25105,95059,535,97124,217,00018,163,0002,502,656stderr