Language: C

#include <stdio.h>
#include <string.h>
#include <math.h>
#define PI 3.1415926535897932384626433832795028841971693993751058209749445923078164

struct point{
	int x,y;
};

struct wind{
	int w,a;
};

double getlen(int x1,int y1,int x2,int y2){
	return sqrt(pow((x1-x2)*1.0,2)+pow((y1-y2)*1.0,2));
}

int check(int N,point *tree,point house,wind wind,int dtree){
	int i;
	double rad,dig;

	for(i = 0;i < N;i++){
		if(wind.a*1.0 < getlen(house.x,house.y,tree[i].x,tree[i].y)){
			return 1;
		}
		rad = atan2((house.y-tree[i].y)*1.0,(house.x-tree[i].x)*1.0);
		dig = fmod((rad * 180.0 / PI)+360.0,360.0);

		if(wind.w*1.0-dtree/2.0+90.0 <= dig+90.0 && wind.w*1.0+dtree/2.0+90.0 >= dig+90.0){
			return 0;
		}
    }

	return 1;
}

int check2(point house,wind wind,int dtree){
	double rad,dig;

	if(wind.a*1.0 < getlen(house.x,house.y,0,0)){
		return 0;
	}

	rad = atan2(house.y*1.0,house.x*1.0);
	dig = fmod((rad * 180.0 / PI)+360.0,360.0);

	if(!(wind.w*1.0-dtree/2.0+90.0 <= dig+90.0 && wind.w*1.0+dtree/2.0+90.0 >= dig+90.0)){
		return 0;
	}

	return 1;
}

void max(int H,int *ok){
	int i,p,dmax;
	int tmp[100];

	p = 0;
	dmax = 0;

	for(i = 0;i < H;i++){
		if(dmax < ok[i]){
			dmax = ok[i];
			tmp[0] = i+1;
			p = 1;
		}else if(dmax != 0 && dmax == ok[i]){
			tmp[p++] = i+1;
		}
	}

	if(dmax == 0){
		printf("NA\n");
	}else{
		for(i = 0;i < p;i++){
			printf("%d%c",tmp[i],(i == p-1) ? '\n' : ' ');
		}
	}
}

int main(){
	int i,j,H,R,U,M,S,du,dm,ds;
	int ok[100];
	point h[100],u[10],m[10],s[10];
	wind wind[100];

	while(1){
		memset(ok,0,sizeof(ok));
		scanf("%d %d",&H,&R);
		if(H == 0 && R == 0){
			break;
		}
		for(i = 0;i < H;i++){
			scanf("%d %d",&h[i].x,&h[i].y);
		}
		scanf("%d %d %d %d %d %d",&U,&M,&S,&du,&dm,&ds);
		for(i = 0;i < U;i++){
			scanf("%d %d",&u[i].x,&u[i].y);
		}
		for(i = 0;i < M;i++){
			scanf("%d %d",&m[i].x,&m[i].y);
		}
		for(i = 0;i < S;i++){
			scanf("%d %d",&s[i].x,&s[i].y);
		}
		for(i = 0;i < R;i++){
			scanf("%d %d",&wind[i].w,&wind[i].a);
		}
	
		for(i = 0;i < R;i++){
			for(j = 0;j < H;j++){
				if(!check2(h[j],wind[i],du)){
					continue;
				}
				if(!check(U,u,h[j],wind[i],du)){
					continue;
				}
				if(!check(M,m,h[j],wind[i],dm)){
					continue;
				}
				if(!check(S,s,h[j],wind[i],ds)){
					continue;
				}
				ok[j]++;
			}
		}
	
		max(H,ok);
	}

	return 0;
}

Compiler output:
main.c:18:17: error: unknown type name 'point'; did you mean 'int'?
   18 | int check(int N,point *tree,point house,wind wind,int dtree){
      |                 ^~~~~
      |                 int
main.c:18:29: error: unknown type name 'point'; did you mean 'int'?
   18 | int check(int N,point *tree,point house,wind wind,int dtree){
      |                             ^~~~~
      |                             int
main.c:18:41: error: unknown type name 'wind'
   18 | int check(int N,point *tree,point house,wind wind,int dtree){
      |                                         ^~~~
main.c:37:12: error: unknown type name 'point'; did you mean 'int'?
   37 | int check2(point house,wind wind,int dtree){
      |            ^~~~~
      |            int
main.c:37:24: error: unknown type name 'wind'
   37 | int check2(point house,wind wind,int dtree){
      |                        ^~~~
main.c: In function 'main':
main.c:83:9: error: unknown type name 'point'; use 'struct' keyword to refer to the type
   83 |         point h[100],u[10],m[10],s[10];
      |         ^~~~~
      |         struct 
main.c:84:9: error: unknown type name 'wind'; use 'struct' keyword to refer to the type
   84 |         wind wind[100];
      |         ^~~~
      |         struct 
main.c:93:44: error: request for member 'x' in something not a structure or union
   93 |                         scanf("%d %d",&h[i].x,&h[i].y);
      |                                            ^
main.c:93:52: error: request for member 'y' in something not a structure or union
   93 |                         scanf("%d %d",&h[i].x,&h[i].y);
      |                                                    ^
main.c:97:44: error: request for member 'x' in something not a structure or union
   97 |                         scanf("%d %d",&u[i].x,&u[i].y);
      |                                            ^
main.c:97:52: error: request for member 'y' in something not a structure or union
   97 |                         scanf("%d %d",&u[i].x,&u[i].y);
      |                                                    ^
main.c:100:44: error: request for member 'x' in something not a structure or union
  100 |                         scanf("%d %d",&m[i].x,&m[i].y);
      |                                            ^
main.c:100:52: error: request for member 'y' in something not a structure or union
  100 |                         scanf("%d %d",&m[i].x,&m[i].y);
      |                                                    ^
main.c:103:44: error: request for member 'x' in something not a structure or union
  103 |                         scanf("%d %d",&s[i].x,&s[i].y);
      |                                            ^
main.c:103:52: error: request for member 'y' in something not a structure or union
  103 |                         scanf("%d %d",&s[i].x,&s[i].y);
      |                                                    ^
main.c:106:47: error: request for member 'w' in something not a structure or union
  106 |                         scanf("%d %d",&wind[i].w,&wind[i].a);
      |                                               ^
main.c:106:58: error: request for member 'a' in something not a structure or union
  106 |                         scanf("%d %d",&wind[i].w,&wind[i].a);
      |                                                          ^
main.c:111:37: error: implicit declaration of function 'check2' [-Wimplicit-function-declaration]
  111 |                                 if(!check2(h[j],wind[i],du)){
      |                                     ^~~~~~
main.c:114:37: error: implicit declaration of function 'check' [-Wimplicit-function-declaration]
  114 |                                 if(!check(U,u,h[j],wind[i],du)){
      |                                     ^~~~~