#include #include #include #include #include #include #include #include #define DB puts("D") #define pb push_back using namespace std; using ll=long long; using ld=long double; const int INF=1e9; const ll LINF=1e18; const double dINF = 1e18; const ld ldINF = 1e18; const double EPS = 1e-6; template void caut(T a, U b, O c){cout<<"("< void caut(T a, U b){cout<<"("< void caut(T a){cout<<"("< void input(T a[], int n){for(int i=0;i>a[i];} template void input(T a[], U b[], int n){for(int i=0;i>a[i]>>b[i];} template void input(T a[], U b[], O[], int n){for(int i=0;i>a[i]>>b[i];} using P=pair; int main() { int n,m; cin>>n>>m; int x,y; cin>>x>>y; x--; y--; double p[n],q[n]; input(p,q,n); vector v[n]; for(int i=0;i>a>>b;; a--;b--; v[a].push_back(b); v[b].push_back(a); } priority_queue

que; que.push({0,x}); double an[n]; fill(an,an+n,dINF); an[x]=0; while(!que.empty()) { P top = que.top(); que.pop(); int f = top.second; if (top.first - EPS > an[top.second]) continue; for(int x : v[f]) { double dis = sqrt((p[x]-p[f])*(p[x]-p[f])+(q[x]-q[f])*(q[x]-q[f])); if (an[x] > an[f] + dis) { an[x] = an[f] + dis; que.push({an[x], x}); } } } cout.precision(10); cout<