#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; const int inf=1<<30; const ll INF=1LL<<62; typedef pair P; typedef pair PP; const ll MOD=998244353; const int dy[]={0,1,0,-1}; const int dx[]={1,0,-1,0}; void chmin(double &a,const double &b){ a=min(a,b); } int main(){ int N,K; cin>>N>>K; vector

pos(N+1); for(int i=0;i>pos[i].first>>pos[i].second; } auto dist=[&](const P lhs,const P rhs)->double{ double dx=lhs.first-rhs.first; double dy=lhs.second-rhs.second; return sqrt(dx*dx+dy*dy); }; vector dp(1<>(N,vector(K+1,INF))); for(int i=0;i>now&1)) continue; for(int to=0;to>to)&1) continue; if(k-1>=0){ chmin(dp[S|1<