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 ...
随机推荐
- mybatis异常:Could not find result map ......... 问题分析及解决
org.apache.ibatis.builder.IncompleteElementException: Could not find result map....... 网上的大部分的改正方法是: ...
- Mysql入门基础命令
1 Mysql基本操作 1.1 查询当前数据库 mysql> show databases; +--------------------+ | Database | +------- ...
- 微信网页授权access_token与基础支持的access_token
问题1:网页授权access_token与分享的jssdk中的access_token一样吗? 答:不一样.网页授权access_token 是一次性的,而基础支持的access_token的是有时间 ...
- 微信小程序插件内页面跳转和参数传递
在此以插件开发中文章列表跳传文章详情为例. 1.首先在插件中的文章列表页面wxml中绑定跳转事件. bindtap='url' data-id="{{item.article_id}}&qu ...
- 【linux】【指令】systemctl 指令部分解读
systemctl [OPTIONS...] {COMMAND} ... Query or send control commands to the systemd manager. -h --hel ...
- python3 练习题100例 (二十)
#!/usr/bin/env python3# -*- coding: utf-8 -*-"""练习二十:判断一个年份是否是闰年公历闰年计算方法:1.普通年能被4整除且不 ...
- 011---Djang的cookie和session
-------------------------------------------------------------cookie与session------------------------- ...
- Linux之rsync同步工具介绍+inotify同步
1.rsync介绍 Rsync是一款开源的.快速的.多功能的.可实现全量及增量的本地或远程数据同步备份的优秀工具.Rsync软件适用于unix/linux/windows等多种操作平台. rsync, ...
- PHP.27-TP框架商城应用实例-后台4-使用Gii生成品牌表的代码
Gii安装[GII适用于商城项目] 将Gii文件夹复到application 是,访问http://xx.com/index.php/gii Gii规则[Gii使用规则与建表规则密切相关] 1.建表字 ...
- 3-1 练习 HTML 总结
1.段落 #段落 <div class="ui segment"> </div> #翻转 <div class="ui inverted s ...