hdu 1593 find a way to escape

http://acm.hdu.edu.cn/showproblem.php?pid=1593

基本思路:0068往elnil的反方向跑,让elnil转半个圆周

所以就是0068何时开始往elnil的反方向跑

只要是0068的角速度大于elnil的角速度,0068就可以在相应的圆周上找到与elnil、圆心 三者共线的点,此时往elnil的反方向跑就可以

所以0068最后所在的圆周是与elnil角速度相等的圆周

#include<cstdio>
#include<cmath>

using namespace std;

double pi=acos(-1);

int main()
{
    int r,v1,v2;
    double w,rr;
    while(scanf("%d%d%d",&r,&v1,&v2)!=EOF) 
    {
         w=1.0*v2/r;
         rr=v1/w;
         puts( (r-rr)/v1<pi*r/v2 ? "Yes" : "No" );
    }
}
原文地址:https://www.cnblogs.com/TheRoadToTheGold/p/12210968.html