#P8943. Deception Point
Deception Point
Background
“The air defense fire net is online.” Delta Two shouted. Sitting in the weapon control seat by the door of the “Kiowa” armed helicopter, he raised his thumb. “The fire net, modulated noise, and cover pulses are all activated and locked.”
Delta One understood at once. He jerked the aircraft into a sharp right bank, and the aircraft returned to a straight route toward “Goya.” This move could avoid “Goya”’s radar surveillance.
“Chaff pack confirmed!” Delta Two shouted.
Absolute isolation,
Delta One thought.
They have no resistance at all.
Their targets had escaped from the Milne Ice Shelf, lucky and cunning, but this time they would not get away again. Rachel Sexton and Michael Tolland chose to abandon the shore and board the ship, a terrible choice. But this would be the last bad decision they ever made.
Problem Description
Rachel and Michael are trapped on the “Goya,” and Delta Two is hunting them by following the radar. Luckily, Rachel also has a radar, so both sides can know each other’s positions.
Inside the ship there are rooms, and there are corridors connecting these rooms. The rooms are connected to each other. Because the ship is cramped, there will be no cycles of length at most inside the ship. Every minute, Rachel and Delta Two will simultaneously run from one room to another room.
If Rachel encounters Delta in a room or on a corridor, it means the end is near. Rachel has a total of questions: when she is in room and Delta Two is in room , can she survive?
[Formal Statement]
Given an undirected connected graph with vertices and edges, and there are no cycles of length (or less). There are queries . Place two tokens on vertices of the graph.
In each turn, both players simultaneously move their token one step along an edge. If the two tokens move to the same vertex at the same time, or traverse the same edge at the same time, then wins. If after turns still has not won, then wins.
Both and are extremely smart, and they will not make decisions that are bad for themselves. Please determine the result of each game. If wins, output Survive; otherwise output Deception.
If you have questions about the statement, please refer to the sample explanation and the Constraints section.
Input Format
The first line contains two integers .
The next lines each contain two integers , indicating that there is a corridor between room and room .
Then follow lines, each containing two integers , indicating one query.
Output Format
Output lines. For each query, if Rachel can survive, output Survive; otherwise output Deception.
8 3
2 1
3 1
4 2
5 3
6 2
7 5
8 4
5 6
7 8
8 6
3 6
Survive
Deception
Survive
Hint
[Sample Explanation]
The ship cabin graph is as follows:

In the second query, Delta can move first to vertex , while Rachel moves to vertex . Then it can be proven that there is no strategy that allows Rachel to avoid encountering Delta.
[Constraints]
This problem uses bundled testdata.
| Score | Special Property | |||
|---|---|---|---|---|
| None | ||||
| None | ||||
For of the data, , , , . There are no cycles of length (or less).
Translated by ChatGPT 5