Hdu 4969 Just a Joke (points)
Link: hdu 4969 Just a Joke
Guizeyanhua is going to chase a girl. The girl is moving at a uniform speed on the Circle centered around Guizeyanhua and with a radius of R. The girl's speed is v1, The Guizeyanhua speed is v2, and the radius is R, guizeyanhua can only run from D to leg pain. Now, Guizeyanhua is going to chase girls only if they are girls and Guizeyanhua are in the same circle.
Solution: Because there are three conditions that need to be collocated, Guizeyanhua and girls must have the same line speed, so v1R = vxr (vx is the speed of Guizeyanhua In the tangent of the circle ), because the speed of Guizeyanhua is determined to be v2, there are v22 = v2x + v2y (vx is the speed of Guizeyanhua approaching the girl's direction), and there are both vy = v22? R2v21R2, and vy = drdt, so dt = 1 vydr. Points r to find out how long it takes for Guizeyanhua to catch up with the girl. Then, use the time t to multiply v2, that is, the distance Guizeyanhua traveled.
The integral part is replaced by a triangle. The original function is y = arcsin (Rrv1)
#include
#include
#include
#include using namespace std;int main () { int cas; double v1, v2, r, d; scanf("%d", &cas); while (cas--) { scanf("%lf%lf%lf%lf", &v1, &v2, &r, &d); double t = r / v1 * asin(v1 / v2); double l = t * v2; printf("%s\n", l > d ? "Why give up treatment" : "Wake up to code"); } return 0;}