Hello all.
I was giving a VP on ABC 118. I tried task D with DP approach.
But it's showing me WA on 4 test cases out of 29.
Can anyone let me know if there is any mistake of my SOLUTION or my approach is wrong actually! It passed 25 test cases already.
I can't understand editorial and unable to understand iterative DP. Thanks in advance.