Hello, I was trying to solve the problem http://uva.onlinejudge.org/external/109/10913.html but i think that it has a mistake in the problem description, in according to the rules: - You can move left, right and down - You can step at most K times, and you can not step one cell more than once
For the first case:
n = 4, k = 1
1 2 3 -5
-10 6 0 -1
-10 -10 -10 2
0 0 0 1
I think that you can go for the next path: (1,1) -> (1,2) -> (1,3) -> (2,3) -> (2,2) -> (4,2) -> (4,3) -> (4,4) right right down left step_down right right
Getting as a maximum sum path : 1 + 2 + 3 + 0 + 6 + 0 + 0 + 1 = 13 But the sample output is 11.
Please, tell me if i am wrong, i do not sure that i understood the problem because to get 11 as output you can not go left :s
Thanks in advance.
Полный текст и комментарии »