BARCA AND REAL
CodeChefOpen on judge ↗
Problem description. There is a group of N people consisting of Barcelona and Real Madrid fans. Coach Tyler wants to distribute some Madrid and Barca jerseys among them. But he has a rule. If one guy gets a Barca jersey, all his friends should get a Madrid jersey and vice versa. But its pretty obvious that if a Barca fan ends up with a Madrid jersey, or a Madrid fan gets a Barca jersey ,they won'
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