Rhett and Link
CodeChefOpen on judge ↗
Rhett and Link are partners in the game Mythical Beasts. In this game, if Rhett kills a monster, he gains experience points(XP) equal to the level of the monster that is killed. As a result, his level becomes equal to the level of the monster. But unlike Link, Rhett is very weak. So he can not kill monsters consecutively. If he kills a monster, he can't kill the next monster and avoids it. However
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