UESTC 1014 Shot
这题刚开始没想通,结果发现要解方程,代码如下:
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<string>
#include<map>
#include<vector>
#include<set>
#include<numeric>
#define mod 1000000007
#define INT 2147483647
#define pi 3.141592654
//freopen("1.txt","r",stdin);
using namespace std; int main()
{
double h,l,v;
double alpha;
double max=; //yaojia h
double height;
while(scanf("%lf%lf%lf",&h,&l,&v))
{
if(h==&&l==&&v==)
break;
double kk=(v*v)/(9.8*l);
double cita=atan(kk);
double tt = l/(cos(cita)*v);
double res = (v*sin(cita)*tt)-((9.8/)*tt*tt);
printf("%.2f\n",res+h);
}
return ;
}
UESTC 1014 Shot的更多相关文章
- POJ 3041 Asteroids / UESTC 253 Asteroids(二分图最大匹配,最小点匹配)
POJ 3041 Asteroids / UESTC 253 Asteroids(二分图最大匹配,最小点匹配) Description Bessie wants to navigate her spa ...
- 1014: [JSOI2008]火星人prefix
1014: [JSOI2008]火星人prefix Time Limit: 10 Sec Memory Limit: 162 MB Description 火星人最近研究了一种操作:求一个字串两个后缀 ...
- BZOJ 1014: [JSOI2008]火星人prefix [splay 二分+hash] 【未完】
1014: [JSOI2008]火星人prefix Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 6243 Solved: 2007[Submit] ...
- ACM:UESTC - 649 括号配对问题 - stack
UESTC - 649 括号配对问题 Time Limit: 1000MS Memory Limit: 65535KB 64bit IO Format: %lld & %llu ...
- UESTC 1015 Lweb and pepper --前,后缀最值
题意: n种食物,每种含花椒的概率为Pi,现在已经选择了[L,R]这个区间(下标)的食物,要再选一个,使总的食物只有一种含花椒的概率最大,问选哪个最好,相同的选下标小的. 解法: 就不写解法了.此处有 ...
- UESTC 1852 Traveling Cellsperson
找规律水题... Traveling Cellsperson Time Limit: 1000ms Memory Limit: 65535KB This problem will be judged ...
- UESTC 1851 Kings on a Chessboard
状压DP... Kings on a Chessboard Time Limit: 10000ms Memory Limit: 65535KB This problem will be judged ...
- BZOJ 1014: [JSOI2008]火星人prefix
Sol Splay+Hash+二分答案. 用Splay维护Hash,二分答案判断. 复杂度 \(O(nlog^2n)\) PS:这题调了两个晚上因为没开long long.许久不写数据结构题感觉写完整 ...
- hdu 1014.Uniform Generator 解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1014 题目意思:给出 STEP 和 MOD,然后根据这个公式:seed(x+1) = [seed(x) ...
随机推荐
- Couchbase介绍,更好的Cache系统
在移动互联网时代,我们面对的是更多的客户端,更低的请求延迟,这当然需要对数据做大量的 Cache 以提高读写速度. 术语 节点:指集群里的一台服务器. 现有 Cache 系统的特点 目前业界使用得最多 ...
- 初识你---------Swift【下篇】
Swift中的结构体 Swift的结构体对比OC来说,可以添加初始化方法.可以遵守代理协议等,同时:Swift的Bool类型的变量也是一个结构体,所以只能选择true和false. Swift中声明结 ...
- [Architecture Pattern] Factory Builder
[Architecture Pattern] Factory Builder 目的 同时提供延迟注入对象.挂载注入项目这两个功能 情景 在开发系统时,如果需要在运行时间才生成并注入对象,可以套用Fac ...
- andriod GridView
<?xml version="1.0" encoding="UTF-8"?> <GridView xmlns:android="ht ...
- andriod arcgis加载影像TIF
private static final String TAG = "MainActivity"; private MapView mapView = null; @Overrid ...
- Android自动更新安装后显示‘完成’‘打开’按钮
/** * 安装apk * * @param url */ private void installApk() { File apkfile = new File(apkFilePath); if ( ...
- 《C程序设计的抽象思维》1.9编程练习
本文地址:http://www.cnblogs.com/archimedes/p/programming-abstractions-in-c-1.html,转载请注明源地址. 1.温度转换: #inc ...
- xcode 设置快捷键 整行上下移动
设置整行代码上下移动:找到Xcode中的自带的配置文件:/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/ ...
- 一个基于DDD的开源项目,各种技术!
基于asp.net mvc + DDD 构架的开源.net cms系统. 运行截图: 特性: 跨平台 支持Windows.Linux.MacOX运行.linux运行案例:http://blog.ops ...
- XP重装之后蓝屏
最近帮公司的电脑重装XP系统,发现重装之后电脑重启的时候蓝屏 解决方法:开机-->f2-->找到SATA Configration --> 选择ide 重启,就ok了