#include using namespace std; #include using namespace atcoder; using ll = long long; int n,m,s,g; using P = pair; vector> G; void solve(){ vector> dist(n,vector(n,INT_MAX/2)); for(int i =0;i>(n,vector(n,INT_MAX/2)); for(int i = 0;i> n >> m >> s >> g; G = vector>(n); for(int i = 0;i> a >> b >> c; G[a].push_back(P(b,c)); } solve(); }