draft:

Need help for SEERC 2019 B

Revision ru1, by Shivatinker, 2019-10-21 20:45:32

Hello everyone. I am stuck with upsolving problem B from SEERC-2019. Problem statement

Even after reading editorials and realizing that my solution seems correct, I keep getting WA#5 on codeforces. I am doing dp, like described in editorial, and sorting all quest before by $$$x_i$$$. I am using $$$dp[j][k]$$$ array and $$$tmp[j][k]$$$ array on every iteration because I need to use every quest at most one time. So I am doing optimization on $$$tmp$$$ array, and then copy its contents back to $$$dp$$$. Then answer should be at $$$dp[s_1][s_1]$$$.

I`ll be very glad if someone more experienced than me could help me find the test, where my solution fails or maybe just give me some hints.

Thank you!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English Shivatinker 2019-10-21 23:00:40 83
en3 English Shivatinker 2019-10-21 22:40:27 194
en2 English Shivatinker 2019-10-21 21:44:27 2 Tiny change: 'dp[s_1][s_1]$.\n\nI`l' -> 'dp[s_1][s_2]$.\n\nI`l'
en1 English Shivatinker 2019-10-21 20:54:42 2277 Initial revision for English translation
ru1 Russian Shivatinker 2019-10-21 20:45:32 862 Первая редакция (сохранено в черновиках)