#include #include #include #include #define PB push_back #define F first #define B back using namespace std; typedef long long int ll; typedef vector vl; typedef vector vvl; double tf, vf, hf, td, vd, hd, ts, vhd, tpad, sispad; int main(int argc, char const *argv[]) { cin>>tf>>vf>>hf>>td>>vd>>hd; vhd = sqrt(6*hd); ts = vhd/3.0; tpad = sqrt(2*hf); sispad = (tpad*vf); double l, r, m; l = 0; r = 1e6; while(abs(r-l) > 1e-5) { m = (l+r)/2.0; double vysf = hf-(m-tf)*(m-tf)/2.0; double sisf = vf*(m-tf); double sisd = vd*(m-td); double vysd = hd; if(m-td < ts) vysd = vhd*(m-td)-3.0*(m-td)*(m-td)/2.0; if(sisd >= sisf && vysd >= vysf) r = m; else l = m; } // cout<<"l: "<