#include #include #include #include #include using namespace std; const double EPS=1e-8; const int maxn=100; int n; struct Point { double x,y; Point (double x=0,double y=0):x(x),y(y){} }; Point poly[maxn]; typedef Point Vector; Vector operator + (Vector A,Vector B) {return Vector(A.x+B.x,A.y+B.y);} Vector operator - (Point A,Point B) {return Vector(A.x-B.x,A.y-B.y);} Vector operator * (Vector A,double p) {return Vector(A.x*p,A.y*p);} Vector operator / (Vector A,double p) {return Vector(A.x/p,A.y/p);} bool operator < (const Point &a,const Point &b){ return a.x < b.x ||(a.x==b.x &&a.y < b.y); } int dcmp (double x){ if(fabs(x)0 && d1<=0 && d2>0) wn++; if(k<0 && d2<=0 && d1>0) wn--; } if(wn!=0) return 1; return 0; } int main() { double v,b,g; while (scanf("%lf %lf %lf",&v,&b,&g),v||b||g) { v=-v; scanf("%d",&n); bool flag=false; int i; double minx=1e12,maxx=-1e12,maxy=-1e12; for(i=0;imaxx) maxx=poly[i].x; if(poly[i].xmaxy) maxy=poly[i].y; } double t; for(int i=0;;i++) { t=i*0.001; Point temp; temp.x=v*t;temp.y=b*t-0.5*g*t*t; if( isPointInPolygon(temp) ) { printf("%.2f\n",t-EPS); flag=true; break; } if(!g && temp.y>maxy) break; if(temp.y<0) break; } if(!flag) printf("Miss!\n"); } return 0; }