#include #define REP(i,n) for(int i=0,i##_len=int(n);i>N>>M>>K; int X,Y; cin>>X>>Y; X--;Y--; vector p(N),q(N); REP(i,N) cin>>p[i]>>q[i]; using P = pair ; vector> graph(N); REP(i,M){ int a,b; cin>>a>>b; a--;b--; double c = sqrt(pow(p[a]-p[b],2) + pow(q[a]-q[b],2)); graph[a].push_back(P(c,b)); graph[b].push_back(P(c,a)); } const double INF=1LL<<40; vector> dist(N); priority_queue,greater> ans; dist[X].push(0); REP(i,N-1) REP(j,N){ if( dist[j].empty()) continue; REP(k,graph[j].size()){ int TO=graph[j][k].second; double COST=graph[j][k].first; while(!dist[j].empty()){ double now = dist[j].top();dist[j].pop(); if(dist[TO].size()K){ dist[TO].pop(); } } } } } while(K--){ printf("%.16f\n", ans.top()); ans.pop(); } }