#include <iostream>
#include <algorithm>
using namespace std;
int calculate(int x, int y, int px, int py)
{
return (px-x)*(px-x) + (py-y)*(py-y);
}
int main()
{
int n, X, Y;
cin >> n >> X >> Y;
int (*point)[2] = new int[n][2];
for(int i = 0; i < n; i++)
cin >> point[i][0] >> point[i][1];
int *roadsize = new int[n];
for(int i = 0; i < n; i++)
roadsize[i] = calculate(X, Y, point[i][0], point[i][1]);
int out[3] = {-1,-1,-1};
for(int i = 0; i < 3; i++)
{
int k = 0;
for(int j = 1; j < n; j++)
{
if(roadsize[j] < roadsize[k])
k = j;
}
out[i] = k + 1;
roadsize[k] = 1000000;
}
for(int i = 0 ; i < 3; i++)
cout << out[i] << endl;
return 0;
}
10-12
1738
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)