help in string and graphs..

i have tried the same thing as provided in the editorial but still getting WA…can anyone please look into my code?

https://www.codechef.com/viewsolution/15030703

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

@vijju123 sorry for disturbing you again…but i am still getting WA… (:

https://www.codechef.com/viewsolution/15033392

I will debug it after breakfast :slight_smile: . You can also refer to my soln I shared at editorial. Might help you :slight_smile:

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 :frowning:

actually i didn’t know this …but it’s ok you deserves it :slight_smile:

1 Like