Salesman Harmony!
CodeChefOpen on judge ↗
The country of Algomania has $N$ cities connected by $N-1$ bi-directional roads. It is possible to move from one city to another using these roads. There are $M$ travelling salesmen in this country. A travelling salesman moves from one city to another selling a particular product. Each of these salesmen will be happy if they get to sell their product in equal number of cities, and since they are s
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