天天看點

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 ;
}