#include #include #include #include #include #define MAX 205000 using ll = long long; typedef std::pair pii; std::map> conexoes; std::map tipos[MAX]; typedef std::pair pli; bool passa[MAX]; ll price[MAX]; std::map passou; int main() { int N, M, K; std::cin>>N>>M>>K; for(int i=0;i!=K;++i){ std::cin>>price[i]; } for(int i=0;i!=M;++i){ int a,b,c=0,d; std::cin>>a>>b>>d;--a;--b; conexoes[{a,d}].push_back({b,c}); conexoes[{b,d}].push_back({a,c}); tipos[a][d]=tipos[b][d]=1; } int A,B; std::cin>>A>>B;--A;--B; std::priority_queue,std::greater> queue; queue.push({0,{A,0}}); while(queue.size()){ auto __ = queue.top(); queue.pop(); ll custo = __.first; int pos = __.second.first; int chave = __.second.second; if(pos==B){///Chegou no final std::cout<