# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
3711 | imsifile | Lonely mdic (kriii1_L) | C++98 | 8 ms | 1096 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |