Help needed in Problem 321B

Revision en1, by ALogB, 2020-11-19 12:30:05

I am solving this problem got the greedy solution but interested to solve this via dp as well can someone explain the dp solution in more better way than editorial ( i am unsatisfied with editorial).

Problem Link -> https://mirror.codeforces.com/problemset/problem/321/B

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ALogB 2020-11-19 12:30:05 293 Initial revision (published)