其实这题我不会,看了解题报告才做出来。

突破点就是0068要找与elnil同角速度的同心圆。在同心圆上,2人的角速度是一样的;而在同心圆内,0068的角速度一直大于elnil的角速度,所以0068可以与elnil在大圆的一条直径上并且使距离达到最大程度。一旦0068到达同心圆上,便直线前进,以保证最快到岸,而此时elnil要走的距离依然是PI*R;

/*
 * hdu1593/win.cpp
 * Created on: 2012-7-23
 * Author    : ben
 */
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <stack>
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <functional>
#include <numeric>
#include <cctype>
using namespace std;
const double pi = acos(-1);

int main() {
#ifndef ONLINE_JUDGE
    freopen("data.in", "r", stdin);
#endif
    double r, v1, v2;
    while(scanf("%lf%lf%lf", &r, &v1, &v2) == 3) {
        if(pi * r / v2 > (v2 - v1) * r / v1 / v2) {
            puts("Yes");
        }else {
            puts("No");
        }
    }
    return 0;
}

相关文章:

  • 2022-12-23
  • 2021-06-29
  • 2021-11-25
  • 2021-10-09
  • 2021-10-18
  • 2022-01-31
  • 2022-01-30
  • 2021-06-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
  • 2021-12-27
  • 2021-12-27
  • 2021-05-21
相关资源
相似解决方案