HDU 5761 物理题
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
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).
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
If the absolute error between your answer and the standard answer is no more than 10−4
, your solution will be accepted.

/******************************
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 物理题的更多相关文章
- hdu 5761 Rower Bo 物理题
Rower Bo 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5761 Description There is a river on the Ca ...
- hdu 5066 小球碰撞(物理题)
http://acm.hdu.edu.cn/showproblem.php?pid=5066 中学物理题 #include <cstdio> #include <cstdlib> ...
- [物理题+枚举] hdu 4445 Crazy Tank
题意: 给你N个炮弹的发射速度,以及炮台高度H和L1,R1,L2,R2. 问任选发射角度.最多能有几个炮弹在不打入L2~R2的情况下打入L1~R1 注意:区间有可能重叠. 思路: 物理题,发现单纯的依 ...
- HDU 1155 Bungee Jumping(物理题,动能公式,弹性势能公式,重力势能公式)
传送门: Bungee Jumping Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Othe ...
- Bungee Jumping---hdu1155(物理题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1155 题目很长,但是很容易理解,就是人从高s的桥上跳下来,手拉着长为l的绳子末端,如果绳子太短那么人将 ...
- 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 ...
- HDOJ 1330 Deck(叠木块-物理题啊!贪心算法用到了一点)
Problem Description A single playing card can be placed on a table, carefully, so that the short edg ...
- hdoj 4445 Crazy Tank 物理题/枚举角度1
Crazy TankTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total S ...
- 杭电 1155 Bungee Jumping(物理题)
Problem Description Once again, James Bond is fleeing from some evil people who want to see him dead ...
随机推荐
- python-读写文件的方式
open(path, flag[, encoding][, errors]) path:要打开文件的路径 flag:打开方式 r 以只读的方式打开文件,文件的描述符放在文件的开头 rb 以二进制格式打 ...
- C语言指针篇(一)指针与指针变量
指针 1. 什么是指针? 2. 指针可不可怕? 3. 指针好不好玩? 4. 怎么学好指针? C语言是跟内存打交道的语言,指针就是内存地址.指针无处不在,指针并不可怕,相反,等你学到一定程 ...
- Robots Gym - 101915G
传送门 The Robotics Olympiad teams were competing in a contest. There was a tree drawn on the floor, co ...
- C# 设置窗口大小为不可调、取消最大化、最小化窗口按键
this.FormBorderStyle = FormBorderStyle.FixedDialog;//设置边框为不可调节 this.MaximizeBox = false; //取消最大化按键 t ...
- 【转】正则表达式速查表(http://www.jb51.net/shouce/jquery1.82/regexp.html)
正则表达式速查表 字符 描述 \ 将下一个字符标记为一个特殊字符.或一个原义字符.或一个向后引用.或一个八进制转义符.例如,“n”匹配字符“n”.“\n”匹配一个换行符.串行“\\”匹配“\”而“\( ...
- LinkedHashMap和HashMap的比较使用 详解
由于现在项目中用到了LinkedHashMap,并不是太熟悉就到网上搜了一下. import java.util.HashMap; import java.util.Iterator; import ...
- Eclipse 创建 Java 项目---Eclipse教程第08课
打开新建 Java 项目向导 通过新建 Java 项目向导可以很容易的创建 Java 项目.打开向导的途径有: 通过点击 "File" 菜单然后选择 New > Java P ...
- VS Extension+NVelocity系列(三)——让VS支持 NVelocity的智能提示(中)
一.定义 我们知道,我们的插件是服务于NVelocity的,在你的项目当中,对于NVelocity的模板应当有一个统一的文件扩展名,以便于VS在打开指定扩展名的文件后,就能起到具体的作用. 如果我没有 ...
- 剑指Offer - 九度1522 - 包含min函数的栈
剑指Offer - 九度1522 - 包含min函数的栈2013-12-01 23:44 题目描述: 定义栈的数据结构,请在该类型中实现一个能够得到栈最小元素的min函数. 输入: 输入可能包含多个测 ...
- 剑指Offer - 九度1518 - 反转链表
剑指Offer - 九度1518 - 反转链表2013-11-30 03:09 题目描述: 输入一个链表,反转链表后,输出链表的所有元素.(hint : 请务必使用链表) 输入: 输入可能包含多个测试 ...