Submission #4003

# Submission time Handle Problem Language Result Execution time Memory
4003 2013-08-31T09:56:34 Z imsifile Lonely mdic (kriii1_L) C++
0 / 1
32 ms 1096 KB
#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
1 Incorrect 32 ms 1096 KB Output isn't correct
2 Halted 0 ms 0 KB -