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:29limanjun99limanjun99Error
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 10:00C#_user12.72CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 10:00025,064,63113,821,0001,171,0002,113,536expected "700", got "624"
2Sep 5, 2026 10:00024,932,51113,633,0001,169,0002,113,536expected "702", got "599"
3Sep 5, 2026 10:00025,781,01413,945,0001,048,0002,113,536expected "726", got "872"
4Apr 24, 2026 10:3039,25734,096,57614,657,0001,046,0002,342,912
5Apr 24, 2026 10:3039,41732,676,33514,716,0001,051,0002,342,912
6Apr 24, 2026 10:3039,47032,302,71213,815,0001,973,0002,519,040
7Apr 24, 2026 10:3039,47736,935,39414,739,0001,052,0002,514,944
8Apr 24, 2026 10:3039,49535,089,28513,824,0001,974,0002,523,136
9Apr 24, 2026 10:3039,56735,067,21214,838,000989,0002,527,232
10Apr 24, 2026 10:3039,56735,104,34413,849,0001,978,0002,519,040
11Apr 24, 2026 10:3039,58233,684,92313,854,0001,979,0002,539,520
12Apr 24, 2026 10:3039,59032,810,88113,857,0001,979,0002,322,432