#include using namespace std; typedef long long int ll; typedef long double ld; #define DEB(a) cerr<<(#a)<<' '<<(a)<EPS){ mid = (low+high)/2; if(cmp(mid)) high = mid; else low = mid+EPS; } return low; } ld tf,vf,hf,td,vd,hd; ld af=1,ad=3; bool cmp(ld totalTime){ ld fallTime=sqrt(2*hf/af);// time till frisbee falls to the ground ld flightTime=max((ld)0,min(fallTime,totalTime-tf)); ld xf=vf*flightTime; DEB(fallTime); DEB(xf); ld dogTime=max((ld)0,totalTime-td); ld xd=vd*dogTime; bool xok=xd/2 >= xf; ld yf=max((ld)0,hf-flightTime*flightTime*af/2); ld timeToJump=2*sqrt(2*yf/ad); DEB(timeToJump); DEB(dogTime); bool yok=yf <= hf && dogTime >= timeToJump; DEB(yf); DEB(xok); DEB(yok); return xok && yok; } int main(){ cin>>tf>>vf>>hf>>td>>vd>>hd; ld res=search(0,1e12,cmp); cout<