Rick Rabbit Morty Monkey
CodeChefOpen on judge ↗
Ricks and Mortys from $N$ different dimensions of the earth are captured by an alien invader! Each Rick definitely has a Morty i.e, There are $N$ Ricks, one from each dimension and corresponding $N$ Mortys. They are locked in a one-dimensional prison(which can be considered as a line). All the Ricks and Mortys stand in a single line such that all Ricks are on the right side and all the Mortys are
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