#include #include #include #include #include #include #include #include #include #include #include using namespace std; using ld = long double; vector x, y, z; ld dist(int i, int j, int k){ ld dx1, dx2, dy1, dy2, dz1, dz2, a, b, c, d; dx1 = x[j]-x[i]; dy1 = y[j]-y[i]; dz1 = z[j]-z[i]; dx2 = x[k]-x[i]; dy2 = y[k]-y[i]; dz2 = z[k]-z[i]; a = dy1*dz2 - dz1*dy2; b = dz1*dx2 - dx1*dz2; c = dx1*dy2 - dy1*dx2; d = a * x[i] + b * y[i] + c * z[i]; return abs(d)/sqrt(a*a+b*b+c*c); } int main(){ int N; cin >> N; x.resize(N); y.resize(N), z.resize(N); ld px, py, pz, xx, yy, zz, ans=0; cin >> px >> py >> pz; for (int i=0; i> xx >> yy >> zz; x[i] = xx-px; y[i] = yy-py; z[i] = zz-pz; } for (int i=0; i