This should be a very common introductory problem for dynamic programming. You can use Google to search for exactly the same model.
Mixtures is also somehow same:-
Codechef Similar Question
Yes, the merging problem is well known, except that the Codechef version was “circular” merging.
In fact, the “circular” merging version is also well known.
Yeah, It was a standard DP
Disappointed after seeing this.
How the algorithm proceed can you explain it ?
In long challenges we expect new questions.
It was classical dynamic problem famously knows as Matrix Multiplication, wondering what’s the problem if it is, because every problem has some subset logic.
Circular isn’t big deal just be greedy and permute it in such a way that largest element comes at end or in beginning and then it’s simply non-circular.
Indeed, I don’t think this problem should be there.
One more Slimes - Educational DP Contest
Yes, so I think this one should be unrated.
You’re right. Thank you for your commit. It helped me a lot.
This is not how things work here.
Don’t say that I spent lot of time in this contest.
OK, I’m just kidding.
No man, I would be 4 star after this