It is a tree + graph question i think




These are the screenshots of question, can anyone help me by suggesting the code of this.

As the contest is going on, I guess it would be plagiarism to discuss the code with you right now. So, try a lil bit hard you will be able to figure out the solution. All the best:+1:

Please refrain from asking doubts of ongoing contests. This would be unfair to others.
Also you can easily get editorials for these after the contests.

Ok and sorry for asking this on wrong time.