Submission #3711

#TimeUsernameProblemLanguageResultExecution timeMemory
3711imsifileLonely mdic (kriii1_L)C++98
0 / 1
8 ms1096 KiB
#include<stdio.h> #include<math.h> #define MX 300. int n, cnt; double xyr[333][3], x, y; int main(){ int i, j, k; scanf("%d", &n); for(i=0; i<n; i++)scanf("%lf%lf%lf", &xyr[i][0], &xyr[i][1], &xyr[i][2]); for(i=0; i<n; i++){ for(j=0; j<MX*2; j++){ x=xyr[i][0]+xyr[i][2]*sin(M_PI/MX*j); y=xyr[i][1]+xyr[i][2]*cos(M_PI/MX*j); for(k=0; k<n; k++){ if(k==i)continue; if(pow(x-xyr[k][0],2)+pow(y-xyr[k][1],2)<=pow(xyr[k][2],2))break; } if(k==n)break; } if(j==MX*2)cnt++; } printf("%d", cnt); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...