Chef Rating
CodeChefOpen on judge ↗
At the end of year 2020 Chef had rating $P$. In year 2021 Chef has given $N$ contest(s). You are given an array of $N$ elements depicting increase or decrease in Chef's rating (rating which he has gained or lost after every contest). What's the current rating of Chef? **Note:** Chef's current rating can be negative. ### Input The first line contains two integers $P$ and $N$. The second line has
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