#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; double left = 0.0; double right = 1000.0; REP(i,100){ double a1 = (2*left + right) / 3; double a2 = (left + 2*right) / 3; double s1 = solve(a1); double s2 = solve(a2); if(s1 < s2){ right = a2; } else if(s2 <= s1){ left = a1; } } printf("%.10lf\n", left); return 0; }