DP Wants Your Help
CodeChefOpen on judge ↗
Danish Parman has a schedule of football matches for $N$ days with exactly one match per day and match fee for each day is given in the schedule. His contract places a limitation for him to play. It states that he cannot play more than $2$ matches consecutively. As we all can guess, he couldn’t understand the terms of his contract properly due to use of complex words like “consecutively”. So he a
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start