Help with solution for timus 1519

Revision en2, by upobir, 2019-01-30 18:01:58

I have been stuck at this problem for quite a long time now. Can someone please provide a detailed solution. I know the trick to be used is broken profile dp, but after that I am in a dead end. Thanks in advance.

Tags dp profile

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English upobir 2019-01-30 18:01:58 12
en1 English upobir 2019-01-30 18:01:21 288 Initial revision (published)