URAL 1192. Ball in a Dream
来源:互联网 发布:守望先锋莫伊拉数据 编辑:程序博客网 时间:2024/05/16 12:28
水题一枚~~之前一直没怎么看懂题,事实证明。。。我想歪了。。。
开始一直没明白过来pi干吗用 = =。。直到样例过不去才发现了,输入是角度。。计算用的是弧度。。笨。。
给你速度和初始角度,每次落地减少为原来1/K的动能,求能跳到的最大距离。。
纯物理题。。
#include <set>#include <map>#include <queue>#include <stack>#include <math.h>#include <stdio.h>#include <stdlib.h>#include <iostream>#include <limits.h>#include <string.h>#include <string>#include <algorithm>#define MID(x,y) ( ( x + y ) >> 1 )#define L(x) ( x << 1 )#define R(x) ( x << 1 | 1 )#define FOR(i,s,t) for(int i=(s); i<(t); i++)#define BUG puts("here!!!")#define STOP system("pause")#define file_r(x) freopen(x, "r", stdin)#define file_w(x) freopen(x, "w", stdout)using namespace std;const double pi = acos(-1.0);int main(){double v, a, k;while( ~scanf("%lf%lf%lf", &v, &a, &k) ){double sum = 0;a = a*pi/180;while( v > 0.01 )//经测试,这个上界最大为0.01.。。。 {double vx = v*sin(a);double vy = v*cos(a);double t = vy / 10.0;sum += vx * t * 2;v /= sqrt(k);}printf("%.2lf\n", sum);}return 0;}
- URAL 1192. Ball in a Dream
- URAL 1192 Ball in a Dream(抛物线运动)
- timus 1192. Ball in a Dream URAL 解题报告 平生第一个计算几何+高中物理
- 【解题报告】 URAL 1192 Ball in a Dream -- 物理模拟水题
- UVA11880 Ball in a Rectangle
- UVA 11880 (Ball in a Rectangle) 平面几何
- UVA 11880 Ball in a Rectangle 几何
- UVA 11880 Ball in a Rectanglefds
- toj 4608 Ball in a Rectangle
- dream a dream
- A Dream
- URAL 1075. Thread in a Space
- ural 1804 The Machinegunners in a Playoff
- URAL 1285 Thread in a Hyperspace
- 'I have a dream' by Martin Luther King in 1963
- uva 11880 Ball in a Rectangle(计算几何)
- 计算几何 ural 1754. Explosion in a Pyramid
- URAL 1715 Another Ball Killer(大模拟)
- Ubuntu下安装可视化SVN客户端Rabbitvcs
- 反编译apk
- 笔记三:获取超级用户权限
- php 读取HTML变成XML
- 通过添加图片,使Excel图表更加生动
- URAL 1192. Ball in a Dream
- javascript中的异常处理
- 如果说Android是Google的特工Smith,那么谁是Neo?
- Jsp测试文件
- 笔记四:vim编辑器的配置
- 正则表达式(QQ校验)
- Flex 采用mx:XML来存储数据
- 再说final变量
- Flex 中使用mx:Model 对数据进行存储