Today I was thinking about one problem for 5 hours and couldn't even solve it after those 5 hours, only after watching at the editorial I observed that my thoughts were only partly correct. It was pure dp problem, therefore I will try to solve more hard dp problems in following days.