← All problemsSign in

Party Planning

CodeChefRating 2562Open on judge ↗

Bilbo is planning his eleventy first birthday. Yes, he will soon be 111 years old. He has to decide whom all to invite to the Party. There are N families in the Shire (numbered 1 to N), and some families hate others. For example, the Bagginses of Bag End are on bad terms with the Sackville Bagginses. Each family declares which among the N families do they hate the most (we call this simply the "en

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