Find the cheapest route from city 1 to city N, where cities within S roads of a zombie city cost q per night and all other cities cost p.
Medium5Shortest pathBFSGraphNo attempts yetTime limit2sMemory limit512 MBThe country of JOI has N cities and M roads. You can move between cities only along roads, and every city can be reached from every other city along roads.
K of the cities have been taken over by zombies.
Gyeonggwak lives in city 1, and the safest shelter with a bunker is city N. Neither city 1 nor city N has been taken over.
Every time Gyeonggwak passes through a city he stays there for one night and pays the lodging fee. A city taken over by zombies offers no lodging, so he cannot pass through it. He pays nothing in city 1, where he starts, or in city N, where he stops.
A city that can be reached from some city taken over by zombies in S road moves or fewer is dangerous, and every other city is safe. Those moves are counted in the original road network, including routes that run through cities taken over by zombies. One night in a safe city costs p won. One night in a dangerous city costs q won, because it comes with a special guard service that keeps zombies out.
Find the smallest total cost of travelling from city 1 to city N.
The first line contains the number of cities N, the number of roads M, the number of cities taken over by zombies K, and the range of danger S, separated by spaces. (2≤N≤100000, 1≤M≤200000, 0≤K≤N−2, 0≤S≤100000)
The second line contains the lodging fee of a safe city p and the lodging fee of a dangerous city q. (1≤p<q≤100000)
Each of the next K lines contains the number of one city taken over by zombies.
Each of the next M lines contains the numbers of the two cities a road connects. Every road can be travelled in both directions.
A route from city 1 to city N that avoids every city taken over by zombies always exists.
Print the smallest cost on one line.

In the road network drawn above the cheapest trip visits the cities in the order 1, 2, 5, 9, 10, 11, 12, 13. No lodging fee is paid in city 1 or in city 13.