编程介的小学生 2016-11-12 13:14 采纳率: 20.5%
浏览 808
已采纳

Taunt Exposure Estimation

The brave knights One…Two…Five! of Camelot are constantly exposed to French taunting while assaulting the castle occupied by the French. Consequently, the taunting to which they are exposed varies with their distance from the castle during their assault, as well as variations in French taunting activity. We need to estimate the total amount of taunting that they are exposed to during a certain time period. Unfortunately, we only have access to a set of measurements at random times ― we do not have a continuous reading ― and, because of flaws in our archaic equipment, the measurements of taunting occur at unpredictable intervals.

The total amount of taunting will be given by the integral of the taunting intensity during the time period, as held in the observation data file. The amount of random noise, though, is fairly high, so that a simple trapezoid-rule integration is all that is merited.

One…Two…Five!

输入:

A single number, n, specifying the number of data points in the file

n pairs of floating point numbers (given in increasing x order), separated by a comma ― in other words, a CSV file that could be input for a spreadsheet program [the first number is the x coordinate (time specification), the second is the y coordinate (the radiation reading)]

输出:

A single number, n, specifying the number of data points in the file

n pairs of floating point numbers (given in increasing x order), separated by a comma ― in other words, a CSV file that could be input for a spreadsheet program [the first number is the x coordinate (time specification), the second is the y coordinate (the radiation reading)]

样例输入:

9
0.0000, 0.5176
0.9869, 1.000
1.596, 1.114
2.370, 1.006
2.904, 0.8481
3.506, 0.5760
3.996, 0.4775
5.004, 0.3945
6.283, 1.004
样例输出:

0.00 to 6.28: 4.7288

  • 写回答

1条回答 默认 最新

  • threenewbee 2016-11-12 13:17
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?