题目描述
Problem Description
JOI-kun's island has been invaded by zombies. JOI-kun decided to escape to the shelter, which is considered the safest place on the island.
The island where JOI-kun lives consists of $ N $ towns numbered from town $ 1 $ to town $ N $, and towns are connected by roads. There are $ M $ roads on the island, and each road connects two different towns. JOI-kun can move freely in both directions on the roads, but cannot travel between towns except through roads.
Some towns are dominated by zombies and cannot be visited. Towns that can be reached from a zombie-dominated town using $ S $ or fewer roads are considered dangerous. Other towns are considered safe.
JOI-kun's house is in town $ 1 $, and the shelter is in town $ N $. Neither town $ 1 $ nor town $ N $ is dominated by zombies. Since traveling on the island's roads takes time, JOI-kun must stay overnight in each town he visits, except for the starting town $ 1 $ and the destination town $ N $. If he stays in a safe town, he stays in a cheap hotel costing $ P $ yen per night, but if he stays in a dangerous town, he stays in a high-end hotel with excellent security services costing $ Q $ yen per night. JOI-kun wants to minimize his total accommodation cost while moving from town $ 1 $ to town $ N $.
Determine the minimum total accommodation cost for JOI-kun to move from town $ 1 $ to town $ N $.
Input Format
The input consists of $ 2 + K + M $ lines.
The first line contains four integers $ N, M, K, S $ ($2 \leq N \leq 100,000$, $1 \leq M \leq 200,000$, $0 \leq K \leq N - 2$, $0 \leq S \leq 100,000$), which indicate that the island consists of $ N $ towns and $ M $ roads, $ K $ towns are dominated by zombies, and towns reachable from a zombie-dominated town within $ S $ roads are considered dangerous.
The second line contains two integers $ P, Q $ ($1 \leq P < Q \leq 100,000$), which indicate that JOI-kun stays in a cheap hotel for $ P $ yen per night in a safe town and in a high-end hotel for $ Q $ yen per night in a dangerous town.
The next $ K $ lines contain one integer $ C_i $ ($2 \leq C_i \leq N - 1$) each, indicating that town $ C_i $ is dominated by zombies. All $C_1, \ldots, C_K$ are distinct.
The next $ M $ lines contain two integers $ A_j, B_j $ ($1 \leq A_j < B_j \leq N$) each, indicating that there is a road between town $ A_j $ and town $ B_j $. No pair $ (A_j, B_j) $ is listed more than once.
It is guaranteed that in the given input data, it is possible to travel from town $ 1 $ to town $ N $ only through towns that are not dominated by zombies.
Output Format
Output the minimum total accommodation cost for JOI-kun to move from town $ 1 $ to town $ N $ in one line.
Note that the output may not fit within the range of a 32-bit signed integer.
Sample Input and Output
Sample Input #1
13 21 1 1
1000 6000
7
1 2
3 7
2 4
5 8
8 9
2 5
3 4
4 7
9 10
10 11
5 9
7 12
3 6
4 5
1 3
11 12
6 7
8 11
6 13
7 8
12 13
Sample Output #1
11000
Sample Input #2
21 26 2 2
1000 2000
5
16
1 2
1 3
1 10
2 5
3 4
4 6
5 8
6 7
7 9
8 10
9 10
9 11
11 13
12 13
12 15
13 14
13 16
14 17
15 16
15 18
16 17
16 19
17 20
18 19
19 20
19 21
Sample Output #2
15000
Notes/Hints
Sample Explanation 1
The input/output example #1 corresponds to the following diagram. Circles represent towns, and lines represent roads.
In this case, towns $ 3, 4, 6, 8, 12 $ are dangerous. The following sequence of town visits minimizes the total accommodation cost:
- Move from town $ 1 $ to town $ 2 $. Stay in a cheap hotel in town $ 2 $ for $ 1,000 $ yen.
- Move from town $ 2 $ to town $ 5 $. Stay in a cheap hotel in town $ 5 $ for $ 1,000 $ yen.
- Move from town $ 5 $ to town $ 9 $. Stay in a cheap hotel in town $ 9 $ for $ 1,000 $ yen.
- Move from town $ 9 $ to town $ 10 $. Stay in a cheap hotel in town $ 10 $ for $ 1,000 $ yen.
- Move from town $ 10 $ to town $ 11 $. Stay in a cheap hotel in town $ 11 $ for $ 1,000 $ yen.
- Move from town $ 11 $ to town $ 12 $. Stay in a high-end hotel in town $ 12 $ for $ 6,000 $ yen.
- Move from town $ 12 $ to town $ 13 $. Do not stay in town $ 13 $.
When JOI-kun travels this route, the total accommodation cost is $ 11,000 $ yen, so output $ 11,000 $.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分