Submission #3711

# Submission time Handle Problem Language Result Execution time Memory
3711 2013-08-31T07:47:58 Z imsifile Lonely mdic (kriii1_L) C++
0 / 1
8 ms 1096 KB
#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
1 Correct 8 ms 1096 KB Output is correct
2 Incorrect 0 ms 1096 KB Output isn't correct
3 Halted 0 ms 0 KB -