// // Created by xjp on 2022/2/28. // #include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> int main(){ int i; double X,Y; double x[5],y[5],hp[5]; while(scanf("%lf %lf",&X,&Y)!=EOF){ for( i=0;i<5;i++){ scanf(" %lf %lf %lf",&x[i],&y[i],&hp[i]); } double L; double s; double R; scanf(" %lf %lf",&L,&R); int flag=0; for(i=0;i<5;i++){ s=sqrt((x[i]-X)*(x[i]-X)+(y[i]-Y)*(y[i]-Y)); // 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; } //#include<stdio.h> //#include<stdlib.h> //#include<string.h> //#include<math.h> //int main(){ // // int t; // scanf("%d",&t); // getchar(); // while(t--){ // char s[1000]; // int a[26]={0}; // scanf("%s",&s); // int len=strlen(s); // for(int i=0;i<len;i++){ // if(s[i]>='A'&&s[i]<='Z'){ // int temp=s[i]-'A'; // a[temp]++; // } // } // for(int i=0;i<26;i++){ // if(a[i]>0){ // // printf("%d%c",a[i],i + 'A'); // } // } // if(t>0){ // // printf("\n"); // } // } // return 0; //} |
Double click to view unformatted code.