题目如下:




第一题基本分析完题意后就能明白让做什么了。需要一个结构体来存放检测点的x,y 另外再需要一个结构体存放x,y与X,Y之间的距离,对第二个结构体中的距离进行排序,取前三个。(这里使用了冒泡排序)代码如下:
#include<iostream>
#include<Windows.h>
using namespace std;
struct local{
int seq;
int x;
int y;
};
struct result{
int seq;
int ans;
};
int main(){
int n,x,y,res,temp,temp2;
struct local *a;
struct re

最低0.47元/天 解锁文章
587

被折叠的 条评论
为什么被折叠?



