How to solve 1485A - Add and Divide using DP ?

Правка en1, от helloworld1102, 2021-02-13 21:14:00

Hello all, this is my first ever blog on codeforces . If i make some mistakes, please forgive me .

Actually i am thinking on the 1485A - Add and Divide and its tutorial is using greedy approach.

But i have read that all optimisation problems can be solved using DP through its optimal substructure and overlapping property .

I am thinking this problem for quite a long time using DP .

So, please tell me how we will define the state for DP and transitions in DP for this problem as they are the most creative part for me .

So how you actually think to make it all easier ? (to differentiate between DP and greedy ) and when to use which technique ?

And , please tell how you decide which problem to solve using greedy and which using DP as both are working on optimisation problems . ------------------

So how you actually differentiate so fast in contest ?

Your answers and clarifications will be very helpful to me .

Thank you all.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский helloworld1102 2021-02-13 21:14:00 998 Initial revision (published)