天天看点

HDU - 4969 多校 J题 Just a Joke

题目链接:https://cn.vjudge.net/contest/226119#problem/J

这个题主要就是考察微积分,我认为主要的难点就是积分公式不记得了,orz…….

首先题目中说了,在跑的过程中 Guizeyanhua 和 Girl 还有 圆心 必须保持三点一线,所以我们可以知道要想三点一线,则Guizeyanhua 和 Girl的角速度必须相同,所以就会有下面的推导:

HDU - 4969 多校 J题 Just a Joke

这样一来代码也就好写了:

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <stack>

using namespace std;

typedef long long LL;
typedef unsigned long long uLL;

int main(){
    int n;
    scanf("%d", &n);
    while(n--){
        double v1, v2, R, D;
        scanf("%lf%lf%lf%lf", &v1, &v2, &R, &D);
        double ans = v2*R*asin(v1/v2)/v1;
        if(ans <= D)
            cout << "Wake up to code" << endl;
        else
            cout << "Why give up treatment" << endl;
    }
    return ;
}