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 29, 2025 02:03zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:59C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 15:00016,208,6256,670,0001,067,0002,121,728expected "10000", got "255 "stderr
2Sep 7, 2026 15:00016,324,3226,645,0001,083,0002,121,728expected "10000", got "255 "stderr
3Sep 7, 2026 15:00016,303,3126,632,0001,050,0002,121,728expected "10000", got "255 "stderr
4May 29, 2025 02:0320,07325,659,9627,026,0001,003,0002,424,832
5May 29, 2025 02:0320,15523,276,0996,047,0002,015,0002,527,232
6May 29, 2025 02:0520,21523,003,0567,076,0001,010,0002,527,232
7May 29, 2025 02:0320,22026,614,6506,066,0002,022,0002,527,232
8May 29, 2025 02:0520,28331,505,5216,085,0002,028,0002,527,232
9May 29, 2025 02:0320,31026,798,6126,093,0002,031,0002,420,736
10May 29, 2025 02:0320,34023,171,8766,102,0002,034,0002,527,232
11May 29, 2025 02:0320,35024,189,7297,123,0001,017,0002,527,232
12May 29, 2025 02:0320,45527,447,5806,137,0002,045,0002,527,232
13May 29, 2025 02:0320,48023,311,1567,168,0001,024,0002,527,232
14May 29, 2025 02:0520,49524,751,3066,149,0002,049,0002,527,232
15May 29, 2025 02:0320,59026,577,0897,207,0001,029,0002,527,232