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