#include using namespace std; typedef long long ll; typedef unsigned long long ull; #define REP(i, n) for(int i=0; ibool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> xa >> ya >> xb >> yb; long double left = -1.0; long double right = 2000.0; REP(i,1000){ long double a1 = (2*left + right) / 3; long double a2 = (left + 2*right) / 3; long double s1 = solve(a1); long double s2 = solve(a2); if(s1 < s2){ right = a2; } else if(s2 <= s1){ left = a1; } } printf("%.20Lf\n", left); return 0; }