UVa 10693 - Traffic Volume
題目:車速為v,車之間的距離最少為v^2/(2f)(防止裝車),車長為L,問1小時最多能走過幾輛車。
分析:數學、物理。
根據題意能够列出方程:nL + (n-1)d = nL + (n-1)v^2/(2f) = 3600v,計算n。化簡得;
n = 7200f/(2Lf/v + v)。這是一個對號函數。當2Lf = v^2 是有最大值。
因此v = sqrt(2Lf),n = 1800sqrt(2f/L)。
說明:╮(╯▽╰)╭。
#include <cstdio>
#include <cmath> int main()
{
int L,f;
while (~scanf("%d%d",&L,&f) && f)
printf("%.8lf %.8lf\n",sqrt(2.0*L*f), 1800.0*sqrt(2.0*f/L)); return 0;
}
UVa 10693 - Traffic Volume的更多相关文章
- 一位学长的ACM总结(感触颇深)
发信人: fennec (fennec), 信区: Algorithm 标 题: acm 总结 by fennec 发信站: 吉林大学牡丹园站 (Wed Dec 8 16:27:55 2004) AC ...
- Debug / Inspect WebSocket traffic with Fiddler【转】
Introduction I have recently written a project using SignalR, which supports HTML 5 WebSocket. Howe ...
- Linux 网络流量查看 Linux ip traffic monitor
Network monitoring on Linux This post mentions some linux command line tools that can be used to mon ...
- Ural 1741 Communication Fiend(隐式图+虚拟节点最短路)
1741. Communication Fiend Time limit: 1.0 second Memory limit: 64 MB Kolya has returned from a summe ...
- (Step1-500题)UVaOJ+算法竞赛入门经典+挑战编程+USACO
http://www.cnblogs.com/sxiszero/p/3618737.html 下面给出的题目共计560道,去掉重复的也有近500题,作为ACMer Training Step1,用1年 ...
- ACM训练计划step 1 [非原创]
(Step1-500题)UVaOJ+算法竞赛入门经典+挑战编程+USACO 下面给出的题目共计560道,去掉重复的也有近500题,作为ACMer Training Step1,用1年到1年半年时间完成 ...
- 转 使用SQL从AWR收集数据库性能变化趋势
使用SQL从AWR收集数据库性能变化趋势 为了对数据库一段时间的性能情况有个全面了解,显然AWR是一个非常有用的工具, 但很多人只会在数据库有性能问题时才会生成问题时段的awr报告去分析.虽然AWR ...
- How to generate the complex data regularly to Ministry of Transport of P.R.C by DB Query Analyzer
How to generate the complex data regularly to Ministry of Transport of P.R.C by DB Query Analyzer 1 ...
- ARVE: Augmented Reality Applications in Vehicle to Edge Networks
ARVE:车辆到边缘网中的增强现实应用 本文为SIGCOMM 2018 Workshop (Mobile Edge Communications, MECOMM)论文. 笔者翻译了该论文.由于时间仓促 ...
随机推荐
- 【LeetCode】105 & 106 Construct Binary Tree from (Preorder and Inorder) || (Inorder and Postorder)Traversal
Description: Given arrays recording 'Preorder and Inorder' Traversal (Problem 105) or 'Inorder and ...
- ActiveMQ 5.10.0 安装与配置
先在官网下载activeMQ,我这里是5.10.0. 然后在解压在一个文件夹下即可. 我这里是:D:\apache-activemq-5.10.0-bin 然后进入bin目录:D:\apache-ac ...
- Mysql中的索引()key 、primary key 、unique key 与index区别)
CREATE TABLE pre_forum_post ( pid int(10) unsigned NOT NULL COMMENT '帖子id', fid mediumint(8) unsigne ...
- XML解析-Dom4j的DOM解析方式更新XML
Dom4j工具,是非官方的,不在jdk中. 使用步骤: 1)导入dom4j的核心包. dom4j-1.6.1.jar 2)编写Dom4j读取xml文件的代码 1.更新XML 1.1.写出内容到xml文 ...
- MyBatis 配置控制台上显示sql语句(log4j.properties 之三)
### direct log messages to stdout ###log4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.app ...
- CF832B Petya and Exam
思路: 模拟. 实现: #include <iostream> using namespace std; string a, b; ]; bool solve() { ) return f ...
- JS——for
打印两行星星: <script> for (var i = 0; i < 2; i++) { for (var j = 0; j < 10; j++) { document.w ...
- 查看Windows XP是否已激活的方法
打开开始→运行, 在输入:oobe/msoobe /a,回车后系统会弹出窗口告诉你系统是否已经激活
- (转) 分布式文件存储FastDFS(七)FastDFS配置文件详解
http://blog.csdn.net/xingjiarong/article/details/50752586 配置FastDFS时,修改配置文件是很重要的一个步骤,理解配置文件中每一项的意义更加 ...
- Discuz! G变量的使用方法
1,G变量的使用方法: 例如:$_G['style'][boardlogo] 风格变量篇 $_G['style'] => Array (官方模板区 cr180整理 $_G['style'][st ...