← All problemsSign in

Subway Surfers

Chef has bought a new phone. He started playing the game “subway surfers”. His friend Mr. X gave him the challenge to break the record $r$ that he made yesterday. In this game, there is $N$ number of trains and in each train, he will get $c$$i$ coins. In crossing one train it will take 2 units of time. Starting from the first train, the chef can move to the next train only after he has collected a

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start