数学问题。

在不经过shield时,竖直速度是1.所以时间就是y/1=y,,,,在经过shield时,时间为shield的数值长度*影响因素,然后总时间把他们加起来,最后再用水平方向的长度除以总时间,还有就是这个题目要用double。

#include<bits/stdc++.h>
using namespace std;
void solve(){
double x,y,x1,y1,a,b=;
scanf("%lf%lf",&x,&y);
int t;
scanf("%d",&t);
for(int i=;i<=t;i++) {
scanf("%lf%lf%lf",&x1,&y1,&a);
y-=y1-x1;
b+=(y1-x1)*a;
}
b+=y*1.0;
double cc=x/b;
printf("%.11lf\n",cc);
}
int main(){
solve();
return ;
}

Problem C Careful Ascent的更多相关文章

  1. 【二分】Urozero Autumn Training Camp 2016 Day 5: NWERC-2016 Problem C. Careful Ascent

    二分Vx即可. #include<cstdio> #include<algorithm> using namespace std; #define EPS 0.00000000 ...

  2. 2016-2017 ACM-ICPC Northwestern European Regional Programming Contest (NWERC 2016)

    A. Arranging Hat $f[i][j]$表示保证前$i$个数字有序,修改了$j$次时第$i$个数字的最小值. 时间复杂度$O(n^3m)$. #include <bits/stdc+ ...

  3. 算法编程Algos Programming

    算法编程Algos Programming 不同算法的集合,用于编程比赛,如ACM ICPC. 算法按主题划分.大多数算法都可以从文件中按原样运行.每种算法都有一个参考问题,并对其时间和空间复杂度作了 ...

  4. Training - Problem and Change Management

    Problem Management Problem management seeks to identify the underlying causes of incidents in an IT ...

  5. 2106 Problem F Shuffling Along 中石油-未提交-->已提交

    题目描述 Most of you have played card games (and if you haven’t, why not???) in which the deck of cards ...

  6. zoj3777 Problem Arrangement

    The 11th Zhejiang Provincial Collegiate Programming Contest is coming! As a problem setter, Edward i ...

  7. Theorems for existence and uniqueness of variational problem

    Introduction Among simulation engineers, it is well accepted that the solution of a PDE can be envis ...

  8. Complexity and Tractability (3.44) - The Traveling Salesman Problem

    Copied From:http://csfieldguide.org.nz/en/curriculum-guides/ncea/level-3/complexity-tractability-TSP ...

  9. ZOJ 3777 - Problem Arrangement - [状压DP][第11届浙江省赛B题]

    题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3777 Time Limit: 2 Seconds      Me ...

随机推荐

  1. P5021 赛道修建 题解

    原题链接 简要题意: 在一棵树上求 \(m\) 条不相交的路径的最小值的最大值. 本题部分分很多,而且本人也交了 \(27\) 次,所以一定要仔细讲部分分! 算法一 对于 \(b_i = a_i + ...

  2. 【2019沈阳网络赛】G、Special necklace——自闭的物理题

    这道题让我差点怀疑自己高考没考过物理 题意中 he measures the resistance of any two endpoints of it, the resistance values ...

  3. 两行代码统计模型参数量与FLOPs,这个PyTorch小工具值得一试

    你的模型到底有多少参数,每秒的浮点运算到底有多少,这些你都知道吗?近日,GitHub 开源了一个小工具,它可以统计 PyTorch 模型的参数量与每秒浮点运算数(FLOPs).有了这两种信息,模型大小 ...

  4. 关于用命令行和idea对项目打jar包

    前提说一下,我们一般是对编译后的项目进行打包,不然打包后还得自己去重新编译class文件. 假如这是你的一个项目目录: 我们要写一个简单的计算器工具类项目,然后对他进行打包, idea里面out文件夹 ...

  5. coding++:TimeUnit 使用

    TimeUnit是java.util.concurrent包下面的一个类,表示给定单元粒度的时间段 主要作用 时间颗粒度转换 延时 常用的颗粒度 TimeUnit.DAYS //天 TimeUnit. ...

  6. mac 根目录下新建文件夹并赋予权限

    在根目录中,你会发现你无法创建文件夹,即使使用命令也无法创建目录: 1.修改auto_master 编译 /etc/auto_master 文件,注释掉或者移除以 /home 开头的那一行,保存. 终 ...

  7. 读者来信 | 如果你家HBase集群Region太多请点进来看看,这个问题你可能会遇到

    前言:<读者来信>是HBase老店开设的一个问答专栏,旨在能为更多的小伙伴解决工作中常遇到的HBase相关的问题.老店会尽力帮大家解决这些问题或帮你发出求救贴,老店希望这会是一个互帮互助的 ...

  8. Ubuntu虚拟机查看文件,目录颜色详解

    查看文件 查看Home(不是home)目录下文件: [duanyongchun@localhost ~]$ ls 查看根目录下文件: [duanyongchun@localhost ~]$ cd / ...

  9. Linux和Windows环境下安装Nginx

    Nginx的安装 windows环境下安装Nginx 安装 Nginx 的下载地址如下: http://nginx.org/en/download.html 选择时尽量选择 Stable 稳定版本,点 ...

  10. [bzoj]1053反质数<暴搜>

    题目:http://www.lydsy.com/JudgeOnline/problem.php?id=1053 感想:这道题拿到以后还是想去知道一个数的约数个数要怎么求,去网上搜了公式,但是还是没有思 ...