#include using namespace std; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n>>m>>k; int x,y; cin>>x>>y; x--;y--; for(int i=0;i ps(n),qs(n); for(int i=0;i>ps[i]>>qs[i]; vector> G(n); for(int i=0;i>u>>v; u--;v--; D d=hypot(ps[u]-ps[v],qs[u]-qs[v]); dist[u][v]=dist[v][u]=d; G[u].emplace_back(v); G[v].emplace_back(u); } struct Path{ vector vs; bool isvalid(int nxt){ assert(!vs.empty()); //cerr<<"sz:"<(const Path &o)const{ if(len!=o.len) return len>o.len; return vs>o.vs; }; }; priority_queue, greater> pq; vector> dp(n); auto push=[&](Path p){ // cerr< cnt(n,0); while(!pq.empty()){ Path p=pq.top();pq.pop(); int v=p.vs.back(); // cerr<k*50) continue; for(int u:G[v]){ // cerr<"<"<len<