← All problemsSign in

Chess Tournament

CSESConstruction ProblemsOpen on judge ↗

There will be a chess tournament of n players. Each player has announced the number of games they want to play. Each pair of players can play at most one game. Your task is to determine which games will be played so that everybody will be happy. Input The first input line has an integer n: the number of players. The players are numbered 1,2,\dots,n. The next line has n integers x_1,x_2,\dots,x

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