# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
4011 | imsifile | Lonely mdic (kriii1_L) | C++98 | 32 ms | 1096 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<stdio.h>
#include<math.h>
#define MX 1500.
int n, cnt, ch[333];
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 || ch[k])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)ch[i]=1, cnt++;
}
printf("%d", cnt);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |