#include<bits/stdc++.h> using namespace std; struct di{ int x,y,hp; double len; }; int main() { double x,y; while(cin>>x>>y){ di hero[5]; for(int i=0;i<5;i++){ cin>>hero[i].x>>hero[i].y>>hero[i].hp; hero[i].len=sqrt((hero[i].x-x)*(hero[i].x-x)+(hero[i].y-y)*(hero[i].y-y)); } double l; double r; cin>>l>>r; int num=0; for(int i=0;i<5;i++){ if(hero[i].len*r>=hero[i].hp&&hero[i].len<=l){ num=1; break; } } if(num==0){ cout<<"No"<<endl; }else{ cout<<"Yes"<<endl; } } return 0; } |
Double click to view unformatted code.