0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-05 14:38:48 +00:00
OI-codes/Luogu/P1652/P1652.cpp

30 lines
653 B
C++
Raw Normal View History

2020-11-06 01:47:53 +00:00
#include <bits/stdc++.h>
using namespace std;
double dis(int x1, int y1, int x2, int y2) {
return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main() {
int n, x1, y1, x2, y2, ans = 0, x[60], y[60], r[60];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
for (int i = 0; i < n; i++) {
cin >> r[i];
}
cin >> x1 >> y1 >> x2 >> y2;
for (int i = 0; i < n; i++) {
if ((dis(x1, y1, x[i], y[i]) < r[i]) ^ (dis(x2, y2, x[i], y[i]) < r[i])) {
ans++;
}
}
cout << ans << endl;
return 0;
}