#include<iostream> #include<cstring> #include<algorithm> #include<queue> #include<stdio.h> #include<string.h> #include<cmath> using namespace std; struct hero{ int x,y; int hp; }; int main() { int x,y; while(scanf("%d%d",&x,&y)!=EOF) { hero h[6]; for(int i=0;i<6;i++) cin>>h[i].x>>h[i].y>>h[i].hp; int dis; double r; cin>>dis; scanf("%lf",&r); int flag=0; for(int i=0;i<6;i++) { double juli=sqrt((h[i].x-x)*(h[i].x-x)+(h[i].y-y)*(h[i].y-y)); if(juli>dis) continue; else if(h[i].hp>juli*r) continue; else { for(int j=0;j<6;j++) { if(i==j) continue; double k=sqrt((h[j].x-x)*(h[j].x-x)+(h[j].y-y)*(h[j].y-y)); if(k*r<h[j].hp) continue; else {flag=1;break;} } } if(flag) break; //int a; //cin>>a; } if(flag) cout<<"Yes"<<endl; else cout<<"No"<<endl; } return 0; } |
Double click to view unformatted code.