Love and War
CodeChefOpen on judge ↗
Chef is very happy today because he is going to meet Chefina, his girlfriend. Chefira is Chef's enemy and he is jealous of Chef because he also likes Chefina. Chefira put $N$ walls in the Chef's path so that Chef cannot meet Chefina. But Chef has to go to Chefina otherwise she will get angry. That's why Chef decided to jump walls if and only if, **height of walls (h[i]) is less than or equal to
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