← All problemsSign in

Break

CodeChefRating 2774Open on judge ↗

Chef has to cook many dishes today. In between cooking two of them, he decided to relax and play a card game with his friend. The game is played with cards that have integer *ranks* written on them. There may be multiple cards with the same rank. At the beginning of the game, Chef gets $N$ cards with ranks $a_1, a_2, \ldots, a_N$ and his friend gets $N$ cards with ranks $b_1, b_2, \ldots, b_N$.

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