#include<iostream>
using namespace std;
#include<algorithm>
#include<vector>
int main()
{
int n,x,y;
cin >> n >> x >> y;
vector<pair<int, int>>nums(n);
vector<pair<int, int>>distance(n);
for (int i = 0; i < n; i++)
{
cin >> nums[i].first>>nums[i].second;
distance[i].first = (x - nums[i].first) * (x - nums[i].first) + (y - nums[i].second) * (y - nums[i].second);
distance[i].second = i + 1;
}
sort(distance.begin(), distance.end());
for (int i = 0; i < min(3, n); ++i)
{
cout << distance[i].second << endl;
}
return 0;
}
CSP第20次CCF计算机软件能力认证 检测点查询
最新推荐文章于 2024-08-31 15:48:32 发布