Home > Back-end >  Ask why the short in the for loop (c, a, b, Y, X) can output nor assignment, but the diatance (0, Y,
Ask why the short in the for loop (c, a, b, Y, X) can output nor assignment, but the diatance (0, Y,

Time:12-23

#include
#include
using namespace std;
Double short (int x, int y, int z, int y [], int x []) {double k=double ((y [y] - [z] y)/(x [y] -x [z])); Double b=double (Y/Y - k * X [Y]);
Return a double (fabs (k * X [X] - [X] Y + b)/SQRT (k * k + 1));
}
Int main () {
Int n, x, y;
Cin> n;
Int X [n], [n] Y;
Int beauty [n]={0};
for(int i=0; ICin> x> y;
[I]=X X;
[I] Y=Y;
}
For (int a=0; AFor (int b=a + 1; BDouble min;
For (int c=0; CIf ((c!=a) & amp; & (c!=b)) {
//min=short (c, a, b, Y, X);
//cout}
/* for (int d=c + 1; DIf ((short (d, a, b, Y, X) & lt; Min) & amp; & (d!=a) & amp; & (d!=b)) {
Min=short (d, a, b, Y, X);
}
} */
}
/*
For (int e=0; EIf (short (e, a, b, Y, X)==min) {
=beauty beauty [e] [e] + 1;
}
} */
}
}
//coutreturn 0;
}