#include #include double px,py; double qx,qy; double absolute(double x){ if(x<0){ return -x; }else{ return x; } } int main(){ double T =0; //T means time. double xave=0, yave=0; scanf("%lf %lf", &px, &py); scanf("%lf %lf", &qx, &qy); if(qx<0) qx = -qx; if(qy<0) qy = -qy; if(px<0) px = -px; if(py<0) py = -py; xave = ( px + qx ) / 2; xave = absolute(xave); yave = ( py + qy ) / 2; yave = absolute(yave); T = xave +yave; printf("%lf\n", T); return 0; }