细节题 不建议做 做完脖子疼
#include<iostream>
#include<cmath>
#include<vector>
#include<string>
#include<map>
#include<algorithm>
using namespace std;
struct Maps
{
string name;
double x1,y1,x2,y2,cx,cy;
pair<double,double> cp;
double Ratio,area;
int level;
Maps(string s,double a,double b,double c,double d):name(s),x1(a),y1(b),x2(c),y2(d)
{
if(x1>x2) swap(x1,x2);
if(y1>y2) swap(y1,y2);
Ratio=(y2-y1)/(x2-x1);
area=(y2-y1)*(x2-x1);
cx=(x2-x1)/2;
cy=(y2-y1)/2;
level=-1;
}
};
vector<Maps> vec;
map<string,pair<double,double>> poi

这篇博客介绍了UVA 511题目,强调其为细节密集型问题,不推荐初学者尝试,完成解题过程可能带来较大困扰。
1376

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



