Problem-2
CodeChefOpen on judge ↗
You bought a new gaming laptop and like playing a game on it all day. It requires frequent charging due to high graphics usage. You want to know how much battery will be left after several playing and charging events. Write a function that receives n records of the laptop's battery consumption and charging events. An events[i] value represents the number of minutes spent charging the laptop (po
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