Help me out in this problem


Hey @shivammishra20121999
Use dp array of size

int dp[201][20001];

According to constraints
though it will still give u TLE

@Kartikkhariwal1 it is giving tle

@Kartikkhariwal1 are u there?

Hey @shivammishra20121999
Yes it will as I told u

Because worst case complexity in top down still remains 2^n ,refer to solution part for more details

You have to solve this using bottum up