Wrong Test Case or my algo is wrong


#1

Comment body goes here. For this test case A : 4 B : [ 1, 2, 3 ]
lexographically smaller output is 1 3 2 with cost 8 True?
But according to the author the output that is lexographically smaller is [2 1 3] and I think the cost is still same that is 8.

please do have a look, my approach is fairly straight forward brute force.
For this problem :- ROD CUTTING


#2

I was wrong the Test Cases are right.