Jack, Jill and Chefland
CodeChefOpen on judge ↗
Jack and Jill were sailing to Chefland on a passenger Ship, a journey which lasts for $N$ days. The crew of the ship were very concerned about the discipline of the passengers. So, they imposed a rule: If the sum of anger induced for a continuous duration of $K$ days by a person surpasses the patience limit $d$ of the crew, they will be provided a small ferry and would be asked to go back to their
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