Santa and his gifts
CodeChefOpen on judge ↗
It's Christmas eve and Santa is back to give away the gifts to a kid. There were two boxes full of gifts. The kid can choose two gifts, one from each box. The box 1 has m gifts and box 2 has n gifts. All the gifts in both the boxes are unique. Santa also poses a question, only answering upon which the kid can claim the gifts. Santa asks how many pairs of gifts the kid can take. The kid, being a ki
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