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 28, 2025 05:11vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:54C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:55018,891,88910,620,00002,113,536expected "10000", got "245 "
2Sep 7, 2026 14:55018,823,27110,624,00002,113,536expected "10000", got "245 "
3Sep 7, 2026 14:55018,926,58910,695,00002,113,536expected "10000", got "245 "
4May 28, 2025 05:1127,27525,197,1839,919,000991,0002,486,272
5May 28, 2025 05:1127,30026,587,5439,928,000992,0002,482,176
6May 28, 2025 05:1127,35326,345,2869,947,000994,0002,482,176
7May 28, 2025 05:1127,41028,260,1339,968,000996,0002,482,176
8May 28, 2025 05:1127,44826,814,9219,981,000998,0002,486,272
9May 28, 2025 05:1127,49025,482,5719,997,000999,0002,482,176
10May 28, 2025 05:1127,49332,318,0609,998,000999,0002,273,280
11May 28, 2025 05:1127,50527,101,60010,002,0001,000,0002,490,368
12May 28, 2025 05:1127,59328,410,02710,034,0001,003,0002,486,272