Uncommenting the commented part will give wrong answer.

```
//vi dp(1000001,-1);
int f(int x,int cnt,const vi &v){
if(x<0)return INT_MAX;
if(x==0)return cnt;
//if(dp[x]!=-1)return dp[x];
int ans=INT_MAX;
for(const int &i:v){
ans=min(ans,f(x-i,cnt+1,v));
}
//dp[x]=ans;
return ans;
}
```

f(11,0,{1,2,5}) should give 3 (5+5+1), but with memo (using map/vector) it gives 7.