Language: C

#define _USE_MATH_DEFINES
#include<stdio.h>
#include<math.h>

int main(){
	int N;
	scanf("%d",&N);
	while(N != 0){
		int x[N],y[N],r[N],m[N];
		for(int i=0;i<N;i++){
			scanf("%d %d %d %d",&x[i],&y[i],&r[i],&m[i]);
		}
		int max = 0;
		for(int i=0;i<N;i++){
			for(double j=0; j< 2*M_PI; j=j+0.001){
				double a,b,c,ab;
				if(j == 0 || j == M_PI){
					a = 1.0;
					b = 0.0;
					c = -x[i]-r[i]*cos(j);
					ab = sqrt(pow(a,2.0)+pow(b,2.0));
				}else{
					a = (-1) * tan(M_PI/2 + j);
					if(a < 0.01 && a > -0.01){
						a = 0.0;
					}
					b = 1.0;
					c = (x[i]+r[i]*cos(j)) * tan(M_PI/2 + j) - y[i] - r[i] * sin(j);
					if(a == 0){
						c = (int)(c*10000)/10000;
					}
					ab = sqrt(pow(a,2.0)+pow(b,2.0));
				}
				int tempmax = 0;
				for(int k=0;k<N;k++){
					if(i==k){
						tempmax++;
					}else{
						double d = fabs(a*x[k] + b*y[k] + c) / ab;
						if(m[k] == 0){
							if((int)(d+0.5) == r[k]){
								tempmax++;
							}
						}else{
							if(d >= r[k] && d <= r[k] + m[k]){
								tempmax++;
							}
						}
					}
				}
				if(max < tempmax){
					max = tempmax;
				}
			}

			for(double j=0; j< 2*M_PI; j=j+0.001){
				double a,b,c,ab;
				if(j == 0 || j == M_PI){
					a = 1.0;
					b = 0.0;
					c = -x[i]-(r[i]+m[i])*cos(j);
					ab = sqrt(pow(a,2.0)+pow(b,2.0));
				}else{
					a = (-1) * tan(M_PI/2 + j);
					if(a < 0.01 && a > -0.01){
						a = 0.0;
					}
					b = 1.0;
					c = (x[i]+( r[i] + m[i] )*cos(j)) * tan(M_PI/2 + j) - y[i] - (r[i] + m[i]) * sin(j);
					if(a == 0){
						c = (int)(c*10000)/10000;
					}
					ab = sqrt(pow(a,2.0)+pow(b,2.0));
				}
				int tempmax = 0;
				for(int k=0;k<N;k++){
					if(i==k){
						tempmax++;
					}else{
						double d = fabs(a*x[k] + b*y[k] + c) / ab;
						if(m[k] == 0){
							if((int)(d+0.5) == r[k]){
								tempmax++;
							}
						}else{
							if(d >= r[k] && d <= r[k] + m[k]){
								tempmax++;
							}
						}
					}
				}
				if(max < tempmax){
					max = tempmax;
				}
			}
		}
		printf("%d\n",max);
		scanf("%d",&N);
	}

}

Compiler output:
/usr/bin/ld: /tmp/ccJNIdhH.o: in function `main':
main.c:(.text+0x2d8): undefined reference to `cos'
/usr/bin/ld: main.c:(.text+0x30f): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x331): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x34c): undefined reference to `sqrt'
/usr/bin/ld: main.c:(.text+0x37a): undefined reference to `tan'
/usr/bin/ld: main.c:(.text+0x41b): undefined reference to `cos'
/usr/bin/ld: main.c:(.text+0x453): undefined reference to `tan'
/usr/bin/ld: main.c:(.text+0x4ad): undefined reference to `sin'
/usr/bin/ld: main.c:(.text+0x532): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x554): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x56f): undefined reference to `sqrt'
/usr/bin/ld: main.c:(.text+0x7ac): undefined reference to `cos'
/usr/bin/ld: main.c:(.text+0x7e3): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x805): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x820): undefined reference to `sqrt'
/usr/bin/ld: main.c:(.text+0x84e): undefined reference to `tan'
/usr/bin/ld: main.c:(.text+0x901): undefined reference to `cos'
/usr/bin/ld: main.c:(.text+0x939): undefined reference to `tan'
/usr/bin/ld: main.c:(.text+0x9a5): undefined reference to `sin'
/usr/bin/ld: main.c:(.text+0xa2a): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0xa4c): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0xa67): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status