Help In Question B. BerSU Ball ( Codeforces Round #277.5 )

Revision en1, by -______-, 2018-06-14 00:09:05

I've successfully solved this problem using Greedy Approach but in the editorial it was given that the probelm can also be solved using Dynamic Programming.

Can someone help me with the DP solution ? (preferably in C++)

Problem Link : http://codeforces.net/problemset/problem/489/B

Editorial Link : http://codeforces.net/blog/entry/14741

My Solution ( Greedy ) : 39216236

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English -______- 2018-06-14 00:09:05 442 Initial revision (published)