#include using namespace std; typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> G[MAX]; ll dis[MAX][2]; bool OK[MAX]; int main(){ std::ifstream in("text.txt"); std::cin.rdbuf(in.rdbuf()); cin.tie(0); ios::sync_with_stdio(false); ll N,M,L,S,E;cin>>N>>M>>L>>S>>E; for(int i=0;i>a>>b>>c; a--;b--; G[a].push_back(mp(b,c)); G[b].push_back(mp(a,c)); } for(int i=0;i>x;x--; OK[x]=true; } for(int i=0;i,vector>,greater>> PQ; dis[0][0]=0; PQ.push({0,0,0}); while(!PQ.empty()){ auto [d,u,f]=PQ.top();PQ.pop(); if(dis[u][f]