← All problemsSign in

A Visit to Icecreamland!

After enduring their 4th semester, Shivansh and Vivek are planning to visit Icecreamland this summer. Icecreamland is a beautiful city having $N$ ice cream parlours indexed from $1$ to $N$. Out of them, **$A$** are of **Amulacious** type (which sell ice cream of Amul Brand) and **$V$** are of **Vadilalicious** type (which sell ice cream of Vadilal brand). Also, there are **$N-1$** roads connecting

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