Help in a codeforces dp problem

codeforces
dynamic-programming
wa

#1

Getting Wrong answer on test case 39:
Here’s the problem link link text
I used dp with memoization(using map). Started from last element and then their are two cases either include it in sum or not include it.
My submission link text