>>> put Little_X OI_World -advanced
>>> put #user OI_World -advanced
My enemy's enemy is my friend.
Little X has to talk with his friends again.
But, during talking to his friends, he finds that some people are friends, and some people are enemies instead.
Now he has an idea : find whoi ar not only enemies but also friends.
He thinks one's enemy's enemy is one's friend.
We give all the people one value, 0 or 1.
And we give all relationships a value, also 0 or 1.
If a relationship (u, v) has a value k, then u^k=v or v^k=u
You need to check whether there is a people has 2 values under all relationships.
If yes, output "Paradox Relationship", if not, output "Stable Friends and Enemies"
Input V and E, V is the number of people, E is the number of relationships.
Then there E lines, u, v, k. See the description.
See the description
3 3
1 2 1
2 3 1
1 3 1
Paradox Relationship
100% cases : V<=100, E<<V*(V-1)/2, u, v <= V, k is in 0 and 1.
It is guaranteed that everyone can meet others through the relationships.
File IO(prship.*)
See check.exe