Largest Square Submatrix of all 1's C#_user

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 listAug 17, 2026 23:08Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 17:48Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 17:5209,159,109789,000024,576expected "2", got "50 "stderr
2Sep 4, 2026 17:5208,726,646802,000024,576expected "2", got "50 "stderr
3Sep 4, 2026 17:5208,866,267797,000024,576expected "2", got "50 "stderr
4Aug 17, 2026 23:111,3308,430,734532,000024,576stderr
5Aug 17, 2026 23:111,3728,615,231549,000024,576stderr
6Aug 17, 2026 23:111,5328,520,227613,000024,576stderr
7Aug 17, 2026 23:111,7108,824,368684,000024,576stderr
8Aug 17, 2026 23:111,7778,949,592711,000024,576stderr
9Aug 17, 2026 23:111,81510,270,907726,000024,576stderr
10Aug 17, 2026 23:112,0008,871,321800,000024,576stderr
11Aug 17, 2026 23:112,0129,016,810805,000024,576stderr
12Aug 17, 2026 23:112,0478,820,039819,000024,576stderr