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 listMay 9, 2026 17:58Aleksei ShahoikaAleksei ShahoikaError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 11:11NoSIMD_C#10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 11:11030,688,47119,616,0001,014,0002,113,536expected "300", got "153"
2Sep 5, 2026 11:11030,688,93319,583,0001,018,0002,113,536expected "300", got "153"
3Sep 5, 2026 11:11031,543,24819,652,0001,076,0002,113,536expected "300", got "153"
4May 9, 2026 17:5923,98725,967,8788,505,0001,090,0002,355,200
5May 9, 2026 17:5925,10726,000,0808,988,0001,055,0002,367,488
6May 9, 2026 17:5930,52228,719,07711,066,0001,143,0002,367,488
7May 9, 2026 17:5932,70227,979,73912,034,0001,047,0002,359,296
8May 9, 2026 17:5932,82228,608,54812,059,0001,070,0002,367,488
9May 9, 2026 17:5933,35731,503,93212,295,0001,048,0002,363,392
10May 9, 2026 17:5933,36528,799,21112,302,0001,044,0002,359,296
11May 9, 2026 17:5933,80530,792,12912,405,0001,117,0002,363,392
12May 9, 2026 17:5934,39528,943,99712,614,0001,144,0002,519,040