func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 0x3f3f3f3f;   const double esp = 0.0000000001;   const double PI = acos(-1.0);   const int mod = 1e9 + 7;   const int MY = 1400 + 5;   const int MX = 1010 + 5;   int num, n, k;   vector<int> G[MX];   int d[MX * MX], g[MX][MX], vis[MX];   struct node {     int x, y;   } P[MX];   bool dfs(int cnt, int m) {     if (cnt > n) return true;     if (vis[cnt]) return dfs(cnt + 1, m);     for (int i = 0; i < (int)G[cnt].size(); ++i) {       m += !vis[G[cnt][i]];       vis[G[cnt][i]]++;     }     if (m <= k && dfs(cnt + 1, m)) return true;     int temp = m;     for (int i = 0; i < (int)G[cnt].size(); ++i) {       vis[G[cnt][i]]--;       m -= !vis[G[cnt][i]];     }     if (G[cnt].size() != 1) {       vis[cnt]++;       if (m + 1 <= k && m + 1 < temp && dfs(cnt + 1, m + 1)) return true;       vis[cnt]--;     }     return false;   }   bool judge(int dist) {     memset(vis, false, sizeof(vis));     for (int i = 1; i <= n; ++i) G[i].clear();     for (int i = 1; i < n; ++i)       for (int j = i + 1; j <= n; ++j)         if (g[i][j] > dist) {           G[i].push_back(j);           G[j].push_back(i);         }     return dfs(1, 0);   }   int binary_search(int le, int rt) {     int mid;     while (le < rt) {       mid = (le + rt) >> 1;       if (judge(d[mid]))         rt = mid;       else         le = mid + 1;     }     return le;   }   int main() {     while (~scanf( %d%d , &n, &k)) {       num = 0;       d[0] = 0;       for (int i = 1; i <= n; ++i) scanf( %d%d , &P[i].x, &P[i].y);       for (int i = 1; i < n; ++i)         for (int j = i + 1; j <= n; ++j)           d[++num] = g[i][j] = (P[i].x - P[j].x) * (P[i].x - P[j].x) +                                (P[i].y - P[j].y) * (P[i].y - P[j].y);       sort(d, d + num + 1);       num = unique(d, d + num + 1) - d - 1;       int mx = binary_search(0, num);       judge(d[mx]);       bool first = false;       for (int i = n; i >= 1; --i)         if (vis[i]) {           if (first) putchar(   );           printf( %d , i);           k--;           first = true;         }       for (int i = n; i >= 1 && k > 0; --i)         if (!vis[i]) {           if (first) putchar(   );           printf( %d , i);           k--;           first = true;         }       cout << endl;     }     return 0;   }   