HDU 1593 find a way to escape

简介:

数学题。

题意是问你能不能逃脱。


当V1的 角速度大于 V2的时候,能够一直保持 V1,O(圆心),V2 三点一线。


跑到一定距离。角速度小于的时候,就以三点一线为初始状态直接跑直线。


#include<cstdio>
#include<cstring>
#include<string>
#include<queue>
#include<algorithm>
#include<map>
#include<stack>
#include<iostream>
#include<list>
#include<set>
#include<cmath>
#define INF 0x7fffffff
#define eps 1e-6
#define LL long long
using namespace std;
const double PI=3.141592654;
double r,v1,v2;
int main()
{
    while(scanf("%lf%lf%lf",&r,&v1,&v2)!=EOF)
    {
        double v=(v1*r)/v2;
        if(v>=r)puts("Yes");
        else
        {
            double t1=(r-v)*v2;
            double t2=(PI*r)*v1;
            if(t1<t2)
                puts("Yes");
            else
                puts("No");
        }
    }
}





本文转自mfrbuaa博客园博客,原文链接:http://www.cnblogs.com/mfrbuaa/p/5155601.html,如需转载请自行联系原作者
相关文章
|
2月前
|
Java
hdu-4883- (Best Coder) TIANKENG’s restaurant
hdu-4883- (Best Coder) TIANKENG’s restaurant
13 0
|
11月前
UVa1583 - Digit Generator
UVa1583 - Digit Generator
39 0
|
11月前
|
人工智能 BI
UVa1554 - Binary Search
UVa1554 - Binary Search
37 0
|
算法 Python
LeetCode 1160. 拼写单词 Find Words That Can Be Formed by Characters
LeetCode 1160. 拼写单词 Find Words That Can Be Formed by Characters
LeetCode 1160. 拼写单词 Find Words That Can Be Formed by Characters
HDOJ/HDU 1062 Text Reverse(字符串翻转~)
HDOJ/HDU 1062 Text Reverse(字符串翻转~)
105 0
HDOJ/HDU 1321 Reverse Text(倒序输出~)
HDOJ/HDU 1321 Reverse Text(倒序输出~)
83 0
|
Web App开发 Java 数据安全/隐私保护
HDOJ(HDU) 1563 Find your present!(异或)
HDOJ(HDU) 1563 Find your present!(异或)
223 0
|
C++
[LeetCode]--290. Word Pattern
Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in s
1195 0