← All problemsSign in

Team Divisions

CodeChefRating 2627Open on judge ↗

Coach Chef has selected all the players and now he has to separate them into 2 teams, $A$ and $B$. Each player must be included in exactly one of the 2 teams and each player $x$, has a skill level $S_x$. It is not necessary for both teams to have equal number of players, but they have to be non-empty. Since the number of players is way too high, Chef doesn't have an actual list of every player

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