Rower Bo

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 650    Accepted Submission(s): 203
Special Judge

Problem Description
There is a river on the Cartesian coordinate system,the river is flowing along the x-axis direction.

Rower Bo is placed at (0,a)

at first.He wants to get to origin (0,0)

by boat.Boat speed relative to water is v1

,and the speed of the water flow is v2

.He will adjust the direction of v1

to origin all the time.

Your task is to calculate how much time he will use to get to origin.Your answer should be rounded to four decimal places.

If he can't arrive origin anyway,print"Infinity"(without quotation marks).

 
Input
There are several test cases. (no more than 1000)

For each test case,there is only one line containing three integers a,v1,v2

.

0≤a≤100

, 0≤v1,v2,≤100

, a,v1,v2

are integers

 
Output
For each test case,print a string or a real number.

If the absolute error between your answer and the standard answer is no more than 10−4

, your solution will be accepted.

 
Sample Input
2 3 3
2 4 3
 
Sample Output
Infinity
1.1428571429
 
Source
 
 
题意 :一个人要坐船过河,从起点(0,a)到终点(0,0),河流和x轴平行,船的速度为v1,水流速度为v2(X轴正方向),要求船的速度的方向一直指向终点(0,0),求船行驶的时间
 
题解:
 
 
 /******************************
code by drizzle
blog: www.cnblogs.com/hsd-/
^ ^ ^ ^
O O
******************************/
//#include<bits/stdc++.h>
#include<iostream>
#include<cstring>
#include<cmath>
#include<cstdio>
#define ll long long
#define mod 1000000007
#define PI acos(-1.0)
using namespace std;
int main()
{
double a,v1,v2;
while(scanf("%lf %lf %lf",&a,&v1,&v2)!=EOF)
{
if(a==)
cout<<"0.00000"<<endl;
else if(v1<=v2)
{
cout<<"Infinity"<<endl;
}
else
{
printf("%.10f\n",a*v1/(v1*v1-v2*v2));
}
}
return ;
}
 

HDU 5761 物理题的更多相关文章

  1. hdu 5761 Rower Bo 物理题

    Rower Bo 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5761 Description There is a river on the Ca ...

  2. hdu 5066 小球碰撞(物理题)

    http://acm.hdu.edu.cn/showproblem.php?pid=5066 中学物理题 #include <cstdio> #include <cstdlib> ...

  3. [物理题+枚举] hdu 4445 Crazy Tank

    题意: 给你N个炮弹的发射速度,以及炮台高度H和L1,R1,L2,R2. 问任选发射角度.最多能有几个炮弹在不打入L2~R2的情况下打入L1~R1 注意:区间有可能重叠. 思路: 物理题,发现单纯的依 ...

  4. HDU 1155 Bungee Jumping(物理题,动能公式,弹性势能公式,重力势能公式)

    传送门: Bungee Jumping Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Othe ...

  5. Bungee Jumping---hdu1155(物理题)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1155 题目很长,但是很容易理解,就是人从高s的桥上跳下来,手拉着长为l的绳子末端,如果绳子太短那么人将 ...

  6. Codeforces Round #114 (Div. 1) A. Wizards and Trolleybuses 物理题

    A. Wizards and Trolleybuses Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/conte ...

  7. HDOJ 1330 Deck(叠木块-物理题啊!贪心算法用到了一点)

    Problem Description A single playing card can be placed on a table, carefully, so that the short edg ...

  8. hdoj 4445 Crazy Tank 物理题/枚举角度1

    Crazy TankTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total S ...

  9. 杭电 1155 Bungee Jumping(物理题)

    Problem Description Once again, James Bond is fleeing from some evil people who want to see him dead ...

随机推荐

  1. 前端之HTML和CSS

    html概述及html文档基本结构 html概述 HTML是 HyperText Mark-up Language 的首字母简写,意思是超文本标记语言,超文本指的是超链接,标记指的是标签,是一种用来制 ...

  2. LeetCode969. 煎饼排序

    问题:969. 煎饼排序 给定数组 A,我们可以对其进行煎饼翻转:我们选择一些正整数 k <= A.length,然后反转 A 的前 k 个元素的顺序.我们要执行零次或多次煎饼翻转(按顺序一次接 ...

  3. selenium破解极限

    一共分为两端段代码: 第一段:获取cookie 第二段:通过cookie登陆 这里以百度云为例: 第一部分:保存cookies,直接在cmd中执行就好 >>> from seleni ...

  4. 完善压缩处理类(支持主流的图像类型(jpg、png、gif)

    <?php /* * 图像压缩 */ class Thumb { //成员属性 private $file; //原图文件 private $thumb_path; //压缩文本件保存的地址 / ...

  5. Linux系统Mini版配置相关

    一:修改ip 编辑:vi /etc/sysconfig/network-sc/ifcfg-eth0 配置如下图:

  6. Apache安装之后,在浏览器输入ip无法访问

    博主本来在linux下面配置安装了apache,然后用浏览器输入ip却无法访问 就一直在想是不是dns无法解析的问题,最后才发现原来是防火墙的原因, 在linux下面 service iptables ...

  7. 宁夏邀请赛F FLOYD

    Moving On Firdaws and Fatinah are living in a country with nn cities, numbered from 11 to nn.Each ci ...

  8. BurpSuite 的使用

    最好用的抓包软件, 不只是抓包软件 IE/Chrome中设置代理的方法是, 打开Internet选项面板->连接->局域网设置->取消勾选的使用自动配置脚本->勾选为LAN使用 ...

  9. FileStream流媒体

    class Program { static void Main(string[] args) { string source = @"mana.mp4"; string targ ...

  10. 获取ubuntu中软件包的有用地址

    http://us.archive.ubuntu.com/ubuntu/pool/main/g/gettext/