Need help in debugging my program for AMMEAT

Problem
My submission

I inputted a vector, sorted it and then reversed it to set it in a decreasing order.
Then started traversing it from the extreme left.

the problem is the accumulate function. it tries to deduce the type of the final value based on the last parameter which is wrong in your case.

1 Like

@dravitgupta - this problem has a difficulty rating of 1275 → weren’t the doubt solvers able to help you out?