Chef and Festival
CodeChefOpen on judge ↗
In Chefland, one festival is going to be held on. The origanizer of the festival is our Chef. Chef is collecting funds from home to home. Chef wants to feature some people from consecutive homes. Chef can feature only $K$ homes if the sum of funds from $K$ consecutive home is maximum. Chef is busy in organizing fest, so he asked you to calculate the maximum sum. Input - The first line contains
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