// // Created by xjp on 2022/2/28. // #include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> int main(){ int i; float X,Y; float x[5],y[5],hp[5]; while(scanf("%f %f",&X,&Y)!=EOF){ for( i=0;i<5;i++){ scanf(" %f %f %f",&x[i],&y[i],&hp[i]); } float L; double s; double R; scanf(" %f %lf",&L,&R); int flag=0; for(i=0;i<5;i++){ s=sqrt(pow(X-x[i],2))+pow(Y-y[i],2); if(s<=L&&hp[i]<=R*s){ flag=1; break; } } if(flag==1){ printf("Yes\n"); } else{ printf("No\n"); } } return 0; } |
Double click to view unformatted code.