Why my test case is failing

@ayushwahi3005 calculate min cost at every step, do not precalculate it cause it won’t work for all the checkpoints

my all test case passed. Its not because of that I have precalculated min cost, its because I have not taken long long int. But still thanku.