Rose Day
CodeChefOpen on judge ↗
Today is rose day, batch mates of Kabir and Tara decided to celebrate this day by exchanging roses with each other. $Note:$ exchanging means both the boy and the girl will give rose to each other. In the class there are $B$ boys and $G$ girls. Exchange of rose will take place if and only if at least one of them hasn't received a rose from anyone else and a rose can be exchanged only once
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