#P5789. [TJOI2017] 可乐(数据加强版)
[TJOI2017] 可乐(数据加强版)
Description
People on the planet Gariton especially like drinking cola. Therefore, their enemy planet developed a cola robot and placed it in City on Gariton. This cola robot has three kinds of actions: stay where it is, go to the next adjacent city, and self-destruct. Every second it randomly triggers one action. Now you are given the city graph of Gariton. At time , the cola robot is in City . After seconds, how many possible action plans does the cola robot have?
Input Format
The first line contains two positive integers , where is the number of cities and is the number of roads.
The next lines each contain , meaning there is a bidirectional road between and .
Finally, input the time .
Output Format
Output the number of possible action plans of the cola robot. The answer may be very large, so output the result modulo .
3 2
1 2
2 3
2
8
Hint
Constraints
For of the data, , .
For of the data, .
For of the data, , .
Sample Explanation
explode.
explode.
explode.
.
.
.
.
.
Translated by ChatGPT 5
京公网安备 11011102002149号