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 24, 2026 04:48Charles CabergsCharles CabergsScore: 158,492Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 24, 2026 04:49155,21581,808,74433,046,00029,040,0002,498,560stderr
2Apr 24, 2026 04:49156,48086,090,10130,286,00032,306,0002,486,272stderr
3Apr 24, 2026 04:49156,81581,853,22032,375,00030,351,0002,502,656stderr
4Apr 24, 2026 04:49157,45784,367,74129,992,00032,991,0002,494,464stderr
5Apr 24, 2026 04:49158,49283,358,52234,214,00029,183,0002,498,560stderr
6Apr 24, 2026 04:49158,75580,190,20433,263,00030,239,0002,297,856stderr
7Apr 24, 2026 04:49160,79583,829,10936,179,00028,139,0002,494,464stderr
8Apr 24, 2026 04:49161,65784,759,44835,363,00029,300,0002,502,656stderr
9Apr 24, 2026 04:49168,45282,636,81136,205,00031,176,0002,301,952stderr