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 ...
随机推荐
- Excel知识点与技巧1
1.工作区:方便两个工作表之间进行对比 2.工作表标签颜色 3.交换两列的次序 4.快速到达边界:即快速到达第一行或最后一行 5.冻结窗格:可以固定某几行或某几列一直存在于窗口,不会随着往下拉或往右拉 ...
- OpenCV-Python 图像分割与Watershed算法 | 三十四
目标 在本章中, 我们将学习使用分水岭算法实现基于标记的图像分割 我们将看到:cv.watershed() 理论 任何灰度图像都可以看作是一个地形表面,其中高强度表示山峰,低强度表示山谷.你开始用不同 ...
- 基于 Spring Cloud 的微服务架构实践指南(上)
show me the code and talk to me,做的出来更要说的明白 GitHub 项目learnSpringCloud同步收录 我是布尔bl,你的支持是我分享的动力! 一. 引入 上 ...
- 来讨论一下这些常见的 Redis 面试题
Redis应该算面试中必问的一个知识点,但是发现很多童鞋并不熟悉这块,这篇就常见的一些问题做一些整理,有不对的地方欢迎留言指正! 1.Redis支持的数据类型? String(字符串) 格式: set ...
- Dome 多人人脸识别 face_recognition
Dome 多人人脸识别 face_recognition 注意 face_recognition 依赖 face_recognition_models 中文字体文件需要自己下载 1.多人人脸识别 # ...
- 万物互联—MQTT协议
一.简介 MQTT(Message Queuing Telemetry Transport,消息队列遥测传输),最早是1999年由IBM开发的基于发布/订阅范式的消息协议,是一种极其简单和轻量级的消息 ...
- C#通用类库整理--字符串处理类
在程序开发中通常需要将字符串转为自己想要的结果,以下三个类库主要实现: 1.GetStrArray(string str, char speater, bool toLower) 把字符串按照分隔符 ...
- Qt实现学生学籍管理系统(文件存储)
记录 19:53 2019-07-30 在小学期学c++做完课设后萌生了把写完的课设放在博客上的想法,于是,我第一篇博客诞生了. 22:32:19 2019-07-30 下棋 16:04:56 201 ...
- PTA数据结构与算法题目集(中文) 7-11
PTA数据结构与算法题目集(中文) 7-11 7-11 关键活动 (30 分) 假定一个工程项目由一组子任务构成,子任务之间有的可以并行执行,有的必须在完成了其它一些子任务后才能执行.“任务调度 ...
- Altium 分形天线设计
Altium 分形天线设计 程序运行界面 Cantor三分集 Koch雪花 Sierpinski垫片 源代码: Iter_Num = 4 'diedai PI = 3.1415926 Call ...