This is very similar problem based upon eulerian tour !
Well it seems codechef has started copying its own past problems (that too word by word)
Exactly same problem appeared in one of codechef contests in 2015
Read this problem and compare with the current problem!
So are you reporting Codechef for plagiarism now
lemme_crack a joke
And will this give TLE for other solutions submitted for the question?
I’m stuck with this please help.
Your code works fine
The problem is that you are just resizing the adj list, that doesnt clear the past test case data, it will just resize the list.
You should instead write adj = vector<vector>(n + 1)
here i corrected it.