玄学事件,玄关
  • 板块学术版
  • 楼主UKE_bound
  • 当前回复4
  • 已保存回复4
  • 发布时间2024/8/7 18:27
  • 上次更新2024/8/7 19:42:50
查看原帖
玄学事件,玄关
1073741
UKE_bound楼主2024/8/7 18:27

本蒟正在拿炸弹炸连环阵

#include<bits/stdc++.h>
using namespace std;
const int maxn=105;
const double eps=1e-9;
int m,n,k;
struct vep{
	int x,y;
};
struct bom{
	int x,y;
	set<vep> wc;//which can
};
vep v[maxn];
bom b[maxn];
bool check(int a,int c){
	bom t1=b[a];
	vep t2=v[c];
	int x1=t1.x,y1=t1.y;
	int x2=t2.x,y2=t2.y;
	return fabs(hypot(x2-x1,y2-y1)-k)<eps;
}
int main(){
	/*cin>>m>>n>>k;
	for(int i=0;i<n;i++){
		cin>>v[i].x>>c[i].y;
	}
	for(int i=0;i<m;i++){
		cin>>v[i].x>>c[i].y;
	}*/
	b[0]={0,0,set<vep>()};
	v[0]={0,0};
	cout<<check(0,0);
	return 0; 
}

我也没直接比较两个vep对象啊!

2024/8/7 18:27
加载中...