← All problemsSign in

Nothing in Common

CodeChefRating 1386Open on judge ↗

Alice has quarreled with Berta recently. Now she doesn't want to have anything in common with her! Recently, they've received two collections of positive integers. The Alice's integers were A1, A2, ..., AN, while Berta's were B1, B2, ..., BM. Now Alice wants to throw away the minimal amount of number from her collection so that their collections would have no common numbers, i.e. there won't be

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