A. Wasted Time
来源:互联网 发布:js 计算器 编辑:程序博客网 时间:2024/06/05 22:55
Mr. Scrooge, a very busy man, decided to count the time he wastes on all sorts of useless stuff to evaluate the lost profit. He has already counted the time he wastes sleeping and eating. And now Mr. Scrooge wants to count the time he has wasted signing papers.
Mr. Scrooge's signature can be represented as a polyline A1A2... An. Scrooge signs like that: first it places a pen at the point A1, then draws a segment from point A1 to point A2, then he draws a segment from point A2 to point A3 and so on to point An, where he stops signing and takes the pen off the paper. At that the resulting line can intersect with itself and partially repeat itself but Scrooge pays no attention to it and never changes his signing style. As Scrooge makes the signature, he never takes the pen off the paper and his writing speed is constant — 50 millimeters per second.
Scrooge signed exactly k papers throughout his life and all those signatures look the same.
Find the total time Scrooge wasted signing the papers.
The first line contains two integers n and k (2 ≤ n ≤ 100, 1 ≤ k ≤ 1000). Each of the following n lines contains the coordinates of the polyline's endpoints. The i-th one contains coordinates of the point Ai — integers xi and yi, separated by a space.
All points Ai are different. The absolute value of all coordinates does not exceed 20. The coordinates are measured in millimeters.
Print one real number — the total time Scrooges wastes on signing the papers in seconds. The absolute or relative error should not exceed10 - 6.
2 10 010 0
0.200000000
5 103 1-5 6-2 -13 210 0
6.032163204
6 105 04 06 03 07 02 0
3.000000000
/(ㄒoㄒ)/~~英语不好,当时都读不懂。
只是用勾股定理求点的距离,然后相加,除Mr. Scrooge的写字速度,再乘以k。
注意最后输出小数点后9位(%.9lf)
- A. Wasted Time
- A. Wasted Time
- Codeforces 127A-Wasted Time(题意)
- Wasted Time
- Wasted Time CodeForces
- 事务时间如何去掉wasted time
- 事务时间如何去掉wasted time
- every day that we spent not improving our xx was a wasted day
- wasted buffer pool memory
- A love before time
- A Head of Time
- a^b time limit
- A notion of time
- A C M time
- It is a long time.
- Time is like a river
- a good tech time schedule
- A Real Time Radiosity Architecture
- c语言堆排序解析
- 话说Spring Security权限管理(源码)
- Linux 工作队列和等待队列的区别
- 猜数字小游戏
- Socket通信
- A. Wasted Time
- Oracle多表关联更新
- fastdfs中tracker、storage、client的理解与学习
- IDA Pro 远程调试Android进程环境配置
- 指针与数组的区别和联系
- linux工作队列机制详解
- Java迭代器介绍
- 益智C语言编程
- MySQL优化