Super Mario
CodeChefOpen on judge ↗
Super Mario is faced with an interesting level containing N pillars. The pillars are arranged on equal distances from each other in a row and every pillar has a height Xi (0 ≤ i ≤ N-1). Mario is standing on the first(with index of 0) pillar and has to reach the last pillar(with index of N-1), jumping only on the pillars and only jumping forward. He can jump over pillars that he wants to skip. His
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