These day im trying to improve my dp skills and then i faced this problem. I did come up with da solution and then... It bugged :(↵
↵
First thought occured in mah mind was that if i was miswrite at some line... But i havent spotted it until now :|↵
↵
Maybe i did not implement it in a correct algo? Or somehow mah eyes so dumb that i cant see the error... Thanks and appreciate all of your helps!↵
↵
Mah submission: https://codeforces.net/contest/2022/submission/297780647↵
Btw this is my drawing about mah algo:↵
↵
![ ](/predownloaded/dd/1a/dd1a5a80b6b14672228d2f2fb84c108b2004e5ae.png)
↵
First thought occured in mah mind was that if i was miswrite at some line... But i havent spotted it until now :|↵
↵
Maybe i did not implement it in a correct algo? Or somehow mah eyes so dumb that i cant see the error... Thanks and appreciate all of your helps!↵
↵
Mah submission: https://codeforces.net/contest/2022/submission/297780647↵
Btw this is my drawing about mah algo:↵
↵
![ ](/predownloaded/dd/1a/dd1a5a80b6b14672228d2f2fb84c108b2004e5ae.png)