please provide the lik to the problem so that i can solve it
ICPC problem////////////////////////////////////////////////
No such link for this question is available with us.
I think this was just an example to explain the concept. There are numerous questions similar to this or relatable in graph challenges.