i have tried the same thing as provided in the editorial but still getting WA…can anyone please look into my code?
1 Like
Your are printing wrong output when sequence is possible.
Input
1
3 4
0 1
0 2
1 2
2 3
Your Output
-1
Correct Output
1 2 2
I will debug it after breakfast . You can also refer to my soln I shared at editorial. Might help you
1 Like
There you go, the next TC-
Input
1
3 5
0 1
0 2
1 2
1 3
2 3
Your output
-1
Correct Output
1 2 1
1 Like
thank u very much…you made my day!! thanks a lot!!
Hey dear! Please dont use award point feature, its already enough to just accept the answer. Award point feature reduces your karma, which is bad
actually i didn’t know this …but it’s ok you deserves it
1 Like