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 18, 2026 16:15Charles CabergsCharles CabergsScore: 372,853Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 18, 2026 16:15359,315169,723,46780,846,00062,880,0002,506,752
2Apr 18, 2026 16:15360,960166,450,89585,227,00059,157,0002,506,752
3Apr 18, 2026 16:15363,515177,950,20480,224,00065,182,0002,318,336
4Apr 18, 2026 16:15363,560171,752,52482,240,00063,184,0002,478,080
5Apr 18, 2026 16:15372,853172,933,38390,085,00059,056,0002,281,472
6Apr 18, 2026 16:15376,625174,469,86988,794,00061,856,0002,326,528
7Apr 18, 2026 16:15377,085186,459,53083,908,00066,926,0002,297,856
8Apr 18, 2026 16:15379,308180,265,69485,843,00065,880,0002,392,064
9Apr 18, 2026 16:15384,145183,810,47289,800,00063,858,0002,293,760