Help needed in 1011 — Marriage Ceremonies (lightoj) problem

Revision en5, by Loser_, 2020-12-30 09:24:03

Hello, in this problem 1011 — Marriage Ceremoniesthe priority index is not clear to me. I used bottom up manner and calculate the max adjacent values.

5
5 10 10 2 3
2 11 3 10 10
16 12 1 5 2
4 2 11 5 2
1 8 14 4 13

Ans:60.Which for me 14 11 12 11 10 total 58.What am I missing here? Need help with that.

My code
Tags lightoj 1011, #divide-and-conquer, #2d-dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English Loser_ 2020-12-30 09:24:03 4
en4 English Loser_ 2020-11-26 10:08:14 2 Tiny change: 'values. \n~~~~~\n5' -> 'values. \n\n~~~~~\n5'
en3 English Loser_ 2020-11-26 10:07:17 155
en2 English Loser_ 2020-11-26 08:56:31 4 Tiny change: '}\n }\n cout<<endl' -> '}\n }\n //cout<<endl'
en1 English Loser_ 2020-11-26 08:54:51 1915 Initial revision (published)