比赛 |
啦啦啦,一星期两次的水题赛 |
评测结果 |
C |
题目名称 |
自由落体 |
最终得分 |
0 |
用户昵称 |
Golden Dawn |
运行时间 |
0.000 s |
代码语言 |
C |
内存使用 |
0.00 MiB |
提交时间 |
2014-10-28 19:58:32 |
显示代码纯文本
- #include<iostream>
- #include<stdio.h>
- #include <math.h>
- using namespace std;
- int p[100001],q[100001];
- double s;
- int main(){
- freopen("freefaller.in","r",stdin);
- freopen("freefaller.out","w",stdout);
- //d=1/2*g*(t^2),其中 g=10,t 为下落时间。地面上的小车以速度 V 前进。
- double l,v,k,h,r,tx;
- int n,w,e,i,wa,we,a,b,c;
- //天花板高度Hx,车长L,车速V, 车高为K
-
- cin>>h>>s>>v>>l>>k>>n;//H,S,V,L,K,n (l<=H,S1,V,L,K,n <=100000)
- h=h-k; s=s-n; tx=sqrt(h/5); // tx表示球落至车高度下的时间 到小车<= 0.00001 时,被接受
- w=v*tx+0.00001; //w为车头处
- e=w-l; //e为车尾处
- wa=w/1;
- we=e/1;
- c=wa-we-1;
- cout<<c;
- return 0;
- }