My map is not working

https://ide.codingblocks.com/s/241573… I did the code but problem is when I get same subsequence map function not works and in the answer I’m getting multiple subsequence …plz help ASAP

use &sign while passing the map
so that the update made are permanent

refer to this code for DP based sol