#include // cout, endl, cin #include // string, to_string, stoi #include // vector #include // min, max, swap, sort, reverse, lower_bound, upper_bound #include // pair, make_pair #include // tuple, make_tuple #include // int64_t, int*_t #include // printf #include // map #include // queue, priority_queue #include // set #include // stack #include // deque #include // unordered_map #include // unordered_set #include // bitset #include // isupper, islower, isdigit, toupper, tolower #include //fixed,setprecision //#include //INT_MAX //#include //M_PI #include #include // 正規表現 #include //#include using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) std::random_device rnd; std::mt19937 mt(rnd()); const int n=100; const int m=8; int x[300],y[300]; bool visited[300]; int P[300]; class terry_yukico{ public: int ransu(int a,int b); double kyori(int p,int q); double evaluateScore(); void input(); void init(); void simulate(); void output(); }; int terry_yukico::ransu(int a, int b) { return a + rand() % (b - a + 1); } double terry_yukico::kyori(int p,int q){ return sqrt((x[p]-x[q])*(x[p]-x[q]) + (y[p]-y[q])*(y[p]-y[q])); } double terry_yukico::evaluateScore(){ double sum = 0; for(int i=1;i<=n;i++) sum += 5*5*kyori(P[i], P[i + 1]); return sum; } void terry_yukico::input(){ int ni,mi; cin>>ni>>mi; for(int i=1;i<=n;i++)cin>>x[i]>>y[i]; } void terry_yukico::init(){ P[1] = 1; P[n+1 ] = 1; for (int i = 2; i <=n; i++) P[i] = i; } void terry_yukico::simulate(){ double best_score=evaluateScore(); rep(i,200000){ int l=ransu(2,n); int r=ransu(2,n); if(l>r)swap(l,r); reverse(P+l,P+r+1); double now_score=evaluateScore(); //cout<<"best:"<=now_score)best_score=now_score; else reverse(P+l,P+r+1); } } void terry_yukico::output(){ rep(i,m){ cout<