inlinelonglongread() { longlong x = 0; int f = 1; char ch = getchar(); while (ch < '0' || ch>'9') { if (ch == '-') f = -1; ch = getchar(); } while (ch >= '0' && ch <= '9') { x = (x << 1) + (x << 3) + (ch ^ 48); ch = getchar(); } return x * f; }
int totN; int totM; int X,Y; int mapp[109][109]; queue<pair<int,int> > Q; int dir[4][2]={{1,0},{-1,0},{0,1},{0,-1}}; int step[109][109]; structstudent { int x,y; }friends[109]; int fricnt=1; bool vis[109][109]; int mindis=99999999;
inlinelonglongread() { longlong x = 0; int f = 1; char ch = getchar(); while (ch < '0' || ch>'9') { if (ch == '-') f = -1; ch = getchar(); } while (ch >= '0' && ch <= '9') { x = (x << 1) + (x << 3) + (ch ^ 48); ch = getchar(); } return x * f; } voidwrite(constint& x) { if (!x) { putchar('0'); return; } char f[100]; int tmp = x; if (tmp < 0) { tmp = -tmp; putchar('-'); } int s = 0; while (tmp > 0) { f[s++] = tmp % 10 + '0'; tmp /= 10; } while (s > 0) { putchar(f[--s]); } }
int totN; double ax,ay,bx,by; structcircle { double x,y; double r; bool in[3]; }circles[1009]; int result;
intmain() { totN=read(); for (int i = 1; i <= totN; ++i) { circles[i].x=read(); } for (int i = 1; i <= totN; ++i) { circles[i].y=read(); } for (int i = 1; i <= totN; ++i) { circles[i].r=read(); } ax=read(); ay=read(); bx=read(); by=read(); for (int i = 1; i <= totN; ++i) { if (fabs(circles[i].x-ax+0.0)*fabs(circles[i].x-ax+0.0)+fabs(circles[i].y-ay+0.0)*fabs(circles[i].y-ay+0.0)<=circles[i].r*circles[i].r+0.0) { circles[i].in[1]=true; } if (fabs(circles[i].x-bx+0.0)*fabs(circles[i].x-bx+0.0)+fabs(circles[i].y-by+0.0)*fabs(circles[i].y-by+0.0)<=circles[i].r*circles[i].r+0.0) { circles[i].in[2]=true; } } for (int i = 1; i <= totN; ++i) { result+=circles[i].in[1]^circles[i].in[2]; } write(result); return0; }//LikiBlaze Code