Unclear on dp transition equation for Codeforces Problem 1666J
Difference between en2 and en3, changed 0 character(s)
I'm confused on the editorial for [problem:1666J]. [View the editorial here](https://codeforces.net/contest/1666/attachments/download/15881/nerc-2021-tutorial.pdf)↵

In the editorial for [problem:1666J], when transitioning from $a_{i,k - 1}$ and $a_{k + 1, j}$ to $a_{i,j},$ $c_{u, v}$ seems to be only added once (the number of messages going from $u$ to $v$, for all $u,v$ such that $i \le u \le k - 1$ and $k < v \le j$) even though the total cost should be $c_{u,v} \cdot d_{u,v}$. What is going on here?↵

Thank you for the help!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English butterflies 2022-07-13 03:49:53 0 (published)
en2 English butterflies 2022-07-13 03:49:43 30 (saved to drafts)
en1 English butterflies 2022-07-13 03:47:52 572 Initial revision (published)