The fact that there are so many doubts for this question mean there's something wrong with the description

I would suggest adding each step of the solution for sample input and output.
The question is not difficult the unclear description is making it difficult to solve.

“also print the maximum strength that he can gather in the park in a new line.”
this line is misleading, it should be “also print the maximum strength after he has completed traveling the park”

Even in the video description, this guy says that S < K at any point. This is wrong as far as I can understand. We have to check S<K only after we have traversed the whole park/2-D array.