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 ...
随机推荐
- hdu2203kmp匹配
拼接字符串即可解决移位的问题: 代码如下: #include<bits/stdc++.h> using namespace std; typedef unsigned int ui; ty ...
- Java ServerSocket详解
ServerSocket 构造方法 ServerSocket serverSocket = new ServerSocket(); ServerSocket(); //无参数 ServerSocket ...
- 服务器安装 mongodb
参考 https://www.cnblogs.com/layezi/p/7290082.html
- coding++:thymelef 模板报错 the entity name must immediately follow the '&' in the entity reference
thymelef模板里面是不能实用&符号的 要用&转义符代替,官网也有文档说明可以用官方的通配符代替, 官方文档 http://www.thymeleaf.org/doc/tutori ...
- intelliJ IDEA 教育版下载教程
声明:本教程针对的是在校本科大学生及以上学历学生群体,因为申请账号需要学校的邮箱来进行验证,所以"社会人士"为了对的起"社会"这两个字,还是花点钱买个正版吧! ...
- Hystrix 使用手册 | 官方文档翻译
由于时间关系可能还没有翻译全,但重要部分已基本包含 本人水平有限,如有翻译不当,请多多批评指出,我一定会修正,谢谢大家.有关 ObservableHystrixCommand 我有的部分选择性忽略了, ...
- turtle实例
1.彩虹 (1) from turtle import * def HSB2RGB(hues): hues = hues * 3.59 #100转成359范围 rgb=[0.0,0.0,0.0] i ...
- IOS部分APP使用burpsuite抓不到包原因
曾经在ios12的时候,iphone通过安装burpsuite的ca证书并开启授权,还可以抓到包,升级到ios13后部分app又回到以前连上代理就断网的情况. 分析:ios(13)+burpsuite ...
- 《Three.js 入门指南》3.1.1 - 基本几何形状-立方体(CubeGeometry)
3.1 基本几何形状 立方体(CubeGeometry) 构造函数: THREE.CubeGeometry(width, height, depth, widthSegments, heightSeg ...
- vue post请求 参数带有中文后端无法接收或者收到乱码,无法返回数据问题
问题来源: 在使用axios时,和java联调,发现调接口服务器始终拿不到参数data,但是检查network也的确传了data,才有了该文章. 基于 vue-axios 和 $.ajax 两种请求方 ...