#define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b using namespace std; #define MAX 200010 #define INF 1000100100 vector> vec[MAX]; double d[MAX],color[MAX],p[MAX],q[MAX]; int n,m,x,y; void dijk(int s){ priority_queue> pq; for(int i=1;i<=n;i++){ d[i]=INF; color[i]=0; } d[s]=0; pq.push({0,s}); color[s]=1; while(!pq.empty()){ pair f=pq.top(); pq.pop(); int u=f.second; color[u]=2; if(d[u] d[u]+vec[u][j].second){ d[v]=d[u]+vec[u][j].second; pq.push({d[v]*(-1),v}); color[v]=1; } } } } int main() { cin>>n>>m>>x>>y; int a,b; double c; rep(i,n) cin>>p[i+1]>>q[i+1]; rep(i,m){ cin>>a>>b; c=sqrt((p[a]-p[b])*(p[a]-p[b])+(q[a]-q[b])*(q[a]-q[b])); vec[a].push_back({b,c}); vec[b].push_back({a,c}); } dijk(x); cout<< fixed << setprecision(15) <