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 listMay 9, 2026 19:21E SequeiraE SequeiraError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 10:56C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 10:57047,095,25132,367,0004,600,0002,117,632expected "300", got "255 "
2Sep 5, 2026 10:57047,577,88732,326,0004,414,0002,117,632expected "300", got "255 "
3Sep 5, 2026 10:57046,875,67632,201,0004,452,0002,117,632expected "300", got "255 "
4May 9, 2026 19:2577,69250,347,27226,580,0004,497,0002,490,368
5May 9, 2026 19:2590,18550,452,39331,549,0004,525,0002,502,656
6May 9, 2026 19:2590,22252,753,95631,493,0004,596,0002,502,656
7May 9, 2026 19:2590,63753,055,24131,581,0004,674,0002,498,560
8May 9, 2026 19:2590,68254,966,21431,537,0004,736,0002,502,656
9May 9, 2026 19:2590,97752,128,22831,634,0004,757,0002,506,752
10May 9, 2026 19:2591,65556,797,68032,118,0004,544,0002,498,560
11May 9, 2026 19:2597,72255,348,74234,522,0004,567,0002,498,560
12May 9, 2026 19:25107,85763,945,39238,757,0004,386,0002,498,560