It’s passing some of the cases when I submit otherwise it is showing TLE
Top down approach for atcoder dp task A
@akh.chakraborty11
int solve(vi &a,ll i,ll n)
you have to pass the vector a by reference, because you are passing by value, a new copy is created in each function call which takes O(n) time.
1 Like