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 listFeb 21, 2026 02:10olliecrowolliecrowScore: 415,943Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 21, 2026 02:10374,753183,102,707146,903,0002,998,0002,379,776
2Feb 21, 2026 02:10375,175183,752,738144,068,0006,002,0002,375,680
3Feb 21, 2026 02:10375,260177,750,585144,100,0006,004,0002,379,776
4Feb 21, 2026 02:10375,305183,106,161147,120,0003,002,0002,400,256
5Feb 21, 2026 02:10415,943193,881,927162,368,0004,009,0002,457,600
6Feb 21, 2026 02:10430,128199,800,647167,050,0005,001,0002,334,720
7Feb 21, 2026 02:10449,530207,774,112175,817,0003,995,0002,478,080
8Feb 21, 2026 02:10552,008251,775,205214,809,0005,994,0002,277,376
9Feb 21, 2026 02:10626,395275,036,445242,573,0007,985,0002,371,584