Favourite Cards
CodeChefOpen on judge ↗
$Jillu$ went to market to buy some fruits. On his way he found a large queue of people in front of a shop. suddenly $Jillu$ come up with an interesting problem that he want to share with you. There are $N$ people in this queue , standing at initital positions $1 to N$. Every person have $M$ type of cards with a value written on each card. For these $M$ cards Jillu have a favouriteness sequence $S
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