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 21, 2026 03:10Charles CabergsCharles CabergsScore: 273,442Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 21, 2026 03:11272,442136,402,89166,986,00041,991,0002,457,600stderr
2Apr 21, 2026 03:11272,817131,508,23044,051,00065,076,0002,473,984stderr
3Apr 21, 2026 03:11272,927133,478,68047,074,00062,097,0002,469,888stderr
4Apr 21, 2026 03:11273,055136,496,16256,114,00053,108,0002,478,080stderr
5Apr 21, 2026 03:11273,442136,577,99741,142,00068,235,0002,478,080stderr
6Apr 21, 2026 03:11273,557144,610,33743,167,00066,256,0002,392,064stderr
7Apr 21, 2026 03:11274,725138,664,36162,937,00046,953,0002,469,888stderr
8Apr 21, 2026 03:11274,815132,839,53938,974,00070,952,0002,519,040stderr
9Apr 21, 2026 03:11276,042135,661,78147,178,00063,239,0002,465,792stderr