/*
蛮力法解决最近对问题
*/#include<iostream>#include<math.h>#define N 5usingnamespace std;intBruteForceClosestPoints(int n,int x[],int y[]){
int d =1000000;int index1 =0;int index2 =0;for(int i =1;i<n
一,思路对点集中所有点编号,依次计算之间的距离,找到最小距离二,代码实现/*蛮力法解决最近对问题*/ #include<iostream>#include<math.h>#define N 5using namespace std;int BruteForceClosestPoints(int n,int x[],int y[]){ int d = 1000000 ; int index1 = 0; int index2 = 0; for(int