Chef and the medals
CodeChefOpen on judge ↗
There are $n$ athletes in a row numbered $1$ to $n$ from left to right waiting to receive medals from Mr chef for their outstanding performance. Each one of the athletes is either facing left or right. When an athlete receives the medal, all the other athletes that can see the current athlete, increase their respect for Mr chef by $1$. An athlete that faces left sees all the athletes with lower i
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