please clarify
As per constraints 1 ≤ n, m. if n is 1 only one column. how cost can be calculated through a(i)(j) - a(i)(j - 1).
As the cost of a movement is a(i)(j) - a(i)(j - 1).
I am getting wrong answer even if my output is exactly matched.
please clarify
As per constraints 1 ≤ n, m. if n is 1 only one column. how cost can be calculated through a(i)(j) - a(i)(j - 1).
As the cost of a movement is a(i)(j) - a(i)(j - 1).
I am getting wrong answer even if my output is exactly matched.