[Codeforces667A]Pouring Rain(数学,几何)
题目链接:http://codeforces.com/contest/667/problem/A
题意:一个杯子里有水,一个人在喝并且同时在往里倒。问这个人能不能喝完,多久能喝完。
把相关变量都量化成高度来做简单。
/*
┓┏┓┏┓┃キリキリ♂ mind!
┛┗┛┗┛┃\○/
┓┏┓┏┓┃ /
┛┗┛┗┛┃ノ)
┓┏┓┏┓┃
┛┗┛┗┛┃
┓┏┓┏┓┃
┛┗┛┗┛┃
┓┏┓┏┓┃
┛┗┛┗┛┃
┓┏┓┏┓┃
┃┃┃┃┃┃
┻┻┻┻┻┻
*/
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <climits>
#include <complex>
#include <fstream>
#include <cassert>
#include <cstdio>
#include <bitset>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <ctime>
#include <set>
#include <map>
#include <cmath>
using namespace std;
#define fr first
#define sc second
#define cl clear
#define BUG puts("here!!!")
#define W(a) while(a--)
#define pb(a) push_back(a)
#define Rlf(a) scanf("%lf", &a);
#define Rint(a) scanf("%d", &a)
#define Rll(a) scanf("%I64d", &a)
#define Rs(a) scanf("%s", a)
#define Cin(a) cin >> a
#define FRead() freopen("in", "r", stdin)
#define FWrite() freopen("out", "w", stdout)
#define Rep(i, len) for(int i = 0; i < (len); i++)
#define For(i, a, len) for(int i = (a); i < (len); i++)
#define Cls(a) memset((a), 0, sizeof(a))
#define Clr(a, x) memset((a), (x), sizeof(a))
#define Full(a) memset((a), 0x7f7f, sizeof(a))
#define lrt rt << 1
#define rrt rt << 1 | 1
#define pi 3.14159265359
#define RT return
#define lowbit(x) x & (-x)
#define onenum(x) __builtin_popcount(x)
typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
typedef pair<int, int> pii;
typedef pair<string, int> psi;
typedef map<string, int> msi;
typedef vector<int> vi;
typedef vector<LL> vl;
typedef vector<vl> vvl;
typedef vector<bool> vb; double d, h, v, e;
int main() {
// FRead();
cin >> d >> h >> v >> e;
d /= ;
if(v / (pi * d * d) <= e) printf("NO\n");
else printf("YES\n%.10f", h / (v / (pi * d * d) - e));
RT ;
}
[Codeforces667A]Pouring Rain(数学,几何)的更多相关文章
- hdu 1577 WisKey的眼神 (数学几何)
WisKey的眼神 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total S ...
- hdu 1115 Lifting the Stone (数学几何)
Lifting the Stone Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others ...
- CodeForces 667A Pouring Rain
A. Pouring Rain time limit per test 1 second memory limit per test 256 megabytes input standard inpu ...
- codeforces 667A A. Pouring Rain(水题)
题目链接: A. Pouring Rain time limit per test 1 second memory limit per test 256 megabytes input standar ...
- ACM: FZU 2110 Star - 数学几何 - 水题
FZU 2110 Star Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Pr ...
- gcc【数学几何】
GCC Time Limit: 1000MS Memory limit: 65536K 题目描述 The GNU Compiler Collection (usually shortened to G ...
- poj 1701【数学几何】
The area Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Su ...
- LightOj1385 - Kingdom Division(数学几何题)
题目链接:http://lightoj.com/volume_showproblem.php?problem=1385 题意:下图中已知面积 a b c 求 d; 如果d的面积不确定,输出-1. 连接 ...
- TZOJ 3244 Happy YuYu's Birthday(数学几何)
描述 9月10日教师节,也是YuYu的生日,妈妈给YuYu准备了一个很大的圆形蛋糕,YuYu看中了蛋糕中间那诱人的樱桃(都挤到一块啦),小家伙很高兴,心里开始盘算着如何将樱桃全部分给自己.YuYu是个 ...
随机推荐
- CentOS 6.0 设置IP地址、网关、DNS
切忌: 在做任何操作之前先备份原文件,我们约定备份文件的名称为:源文件名称+bak,例如原文件名称为:centos.txt 那么备份文件名称为:centos.txtbak 引言:linux ...
- iTween基础之Move(移动)
1,五种移动方法:2, 函数的基础属性及用法 原文地址:http://blog.csdn.net/dingkun520wy/article/details/50476864 iTween官网:http ...
- 团队项目之NABC
Time:2013-10-22 Author:wang 一个成功的人,总是知道如何管理自己的时间,如何让自己的时间得到最充分最有效的利用.对学生一族而言,课业负担重,各种课程.各种活动.各种社团,如果 ...
- Ubuntu实用快捷键
ALT + TAB: 切换程序窗口Win+w: 显示所有的工作空间,可轻松进行切换 ===== Terminal终端 ===== CTRL + ALT + T: 打开终端 TAB: 自动补全命令或文件 ...
- JAVA SSH 框架介绍
SSH 为 struts+spring+hibernate 的一个集成框架,是目前较流行的一种JAVA Web应用程序开源框架. Struts Struts是一个基于Sun J2EE平台的MVC框架, ...
- mysql memory
mysql memory engine 创建: mysql> create table mt engine = memory select * from information_schema.t ...
- 【POJ】【3164】Commond Network
最小树形图 最小树形图模板题,朱-刘算法. 题解:http://blog.csdn.net/shuangde800/article/details/8039359 这位大神代码写的非常通俗易懂,而且这 ...
- synergy--共享你的键鼠
synergy用来分享一套键鼠,作用于多台主机.可作用于linux.Windows和mac平台.工作方式是:将一台主机作为服务器端,然后服务器端将会分享自己的键鼠,另一台主机作为客户端连接服务端就可以 ...
- hdu2011
http://acm.hdu.edu.cn/showproblem.php?pid=2011 #include<iostream> #include<math.h> #incl ...
- Mac 下 docker安装
http://www.th7.cn/system/mac/201405/56653.shtml Mac 下 docker安装 以及 处理错误Cannot connect to the Docker d ...