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 listApr 24, 2026 10:41limanjun99limanjun99Error
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 10:51C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 10:51025,981,91614,152,0001,068,0002,113,536expected "300", got "85"
2Sep 5, 2026 10:51026,270,70614,190,0001,275,0002,113,536expected "300", got "85"
3Sep 5, 2026 10:51026,015,25814,164,0001,045,0002,113,536expected "300", got "85"
4Apr 24, 2026 10:4439,28237,814,05514,666,0001,047,0002,510,848
5Apr 24, 2026 10:4439,34533,776,27814,689,0001,049,0002,519,040
6Apr 24, 2026 10:4439,40238,450,93514,711,0001,050,0002,535,424
7Apr 24, 2026 10:4439,47534,148,44413,817,0001,973,0002,531,328
8Apr 24, 2026 10:4439,51531,912,51513,831,0001,975,0002,519,040
9Apr 24, 2026 10:4439,55031,940,47113,843,0001,977,0002,531,328
10Apr 24, 2026 10:4439,55734,069,53814,769,0001,054,0002,519,040
11Apr 24, 2026 10:4439,59233,797,31013,858,0001,979,0002,338,816
12Apr 24, 2026 10:4439,61533,133,17415,846,00002,342,912