Problem C Careful Ascent
数学问题。
在不经过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的更多相关文章
- 【二分】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 ...
- 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+ ...
- 算法编程Algos Programming
算法编程Algos Programming 不同算法的集合,用于编程比赛,如ACM ICPC. 算法按主题划分.大多数算法都可以从文件中按原样运行.每种算法都有一个参考问题,并对其时间和空间复杂度作了 ...
- Training - Problem and Change Management
Problem Management Problem management seeks to identify the underlying causes of incidents in an IT ...
- 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 ...
- zoj3777 Problem Arrangement
The 11th Zhejiang Provincial Collegiate Programming Contest is coming! As a problem setter, Edward i ...
- 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 ...
- Complexity and Tractability (3.44) - The Traveling Salesman Problem
Copied From:http://csfieldguide.org.nz/en/curriculum-guides/ncea/level-3/complexity-tractability-TSP ...
- ZOJ 3777 - Problem Arrangement - [状压DP][第11届浙江省赛B题]
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3777 Time Limit: 2 Seconds Me ...
随机推荐
- springboot使用swagger2创建文档
一.导入swagger2依赖 <dependency> <groupId>io.springfox</groupId> <artifactId>spri ...
- Spss统计描述分析
总觉得有些技能学会了是不会忘的,但是还是要记录一下,怕记忆力不像狗皮膏药,并不那么牢固. 1.文件的合并 两个数据文件的合并 点击添加个案,这一步按照自己的需求选择,也可以打开外部数据集,在这里打开的 ...
- 使用条件随机场模型解决文本分类问题(附Python代码)
对深度学习感兴趣,热爱Tensorflow的小伙伴,欢迎关注我们的网站!http://www.tensorflownews.com.我们的公众号:磐创AI. 一. 介绍 世界上每天都在生成数量惊人的文 ...
- HTTP下午茶 - 小白入门书
这本书十分精炼,非常适合零基础的小白. 资源介绍 首先,书籍是免费的! 英文原版书籍,作者是 Launch School,是一家教育网站,可以在线阅读: https://launchschool.co ...
- coding++:SpringBoot-事务注解详解
@Transactional spring 事务注解 1.简单开启事务管理 @EnableTransactionManagement // 启注解事务管理,等同于xml配置方式的 <tx:ann ...
- Java 学习笔记 第一章:Java语言开发环境搭建
第一章:Java语言开发环境搭建 第二章:常量.变量和数据类型 第三章:数据类型转换.运算符和方法入门 1.Java虚拟机——JVM JVM(Java Virtual Machine ):Java虚拟 ...
- MySQL count知多少
统计一个表的数据量是经常遇到的需求,但是不同的表设计及不同的写法,统计性能差别会有较大的差异,下面就简单通过实验进行测试(大家测试的时候注意缓存的情况,否则影响测试结果). 1. 准备工作 为了后续测 ...
- 以个人身份加入.NET基金会
.NET 走向开源,MIT许可协议. 微软为了推动.NET开源社区的发展,2014年联合社区成立了.NET基金会. 一年前 .NET 基金会完成第一次全面改选,2014年 .NET基金会的创始成员中有 ...
- 学习笔记-EL
仅作为学习过程中笔记作用,若有不正确的地方欢迎指正 目标 理解El的作用,熟练使用EL EL表达式与Jsp表达式对比来记 EL表达式的概念,作用,语法 Jsp作用主要是用来实现动态网页的,而动态网页中 ...
- tkinter gui控件回调和grid布局优化
0.引子 Tkinter 是 Python 的标准 GUI 库.Python 使用 Tkinter 可以快速的创建 GUI 应用程序.由于 Tkinter 是内置到 python 的安装包中.只要安装 ...