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 26, 2026 05:34Charles CabergsCharles CabergsScore: 108,560Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 26, 2026 05:35107,22562,187,81817,954,00024,936,0002,510,848
2Apr 26, 2026 05:35107,41559,869,89823,981,00018,985,0002,506,752
3Apr 26, 2026 05:35107,57560,980,37219,013,00024,017,0002,519,040
4Apr 26, 2026 05:35108,21559,040,46421,140,00022,146,0002,510,848
5Apr 26, 2026 05:35108,56056,288,23920,197,00023,227,0002,506,752
6Apr 26, 2026 05:35109,28065,440,50621,348,00022,364,0002,510,848
7Apr 26, 2026 05:35109,42763,076,49224,430,00019,341,0002,506,752
8Apr 26, 2026 05:35114,98764,843,93726,997,00018,998,0002,314,240
9Apr 26, 2026 05:35116,71061,513,22324,357,00022,327,0002,502,656