Hello CodeForces!
Let's take a look at DP -Dynamic Programming.
I, as an experienced profession in programming, have prepared a sentence to tell everyone; The sentence I am going to note, is a result of years of studying and coding;
here it is : "DP solves any problem"
Here, I have collected some problems which can be easily solved using DP :
Hope enjoy them!









Thanks!
Good Ones!
"DP solves any problem"
That's a pretty bold statement. How to use DP to solve the problem "1 + 1 = ___" ?
That's simple : dp[1][1]=2
update :
LooOoOOOOooOOooL. Try 1e100 + 1e100 then.
We can handle it using supercomputers :))
Lol. How about saying that supercomputers can solve any computational problem (eventually)?
Ok, but we use DP anyway!
well how about digit dp? works like a charm
I also think dp can solve any problems too, except non-dp problems.