21205_TauntExposureEstimation

2022-5-16 18:18| 发布者: Hocassian| 查看: 40| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-3-8950516017499-Problem List-采集的数据-后羿采集器.html

Pro.ID

21205

Title

Taunt Exposure Estimation

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21205

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 1500/500 MS (Java/Others)     Memory Limit: 131072/65536 K (Java/Others)
  • 描述

    The brave knights (k’ nig’ ts) 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.


    输入

     A single number, n, specifying the number of data points
    • 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)]

    输出

    Description
    The brave knights (k’ nig’ ts) 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.


    Input
     A single number, n, specifying the number of data points
    • 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)]
    Output
    A single line of text giving the first and last x values (with two digits to the right of the decimal point), and the computed integral (with four digits to the right of the decimal point), in the fashion shown below (which reflects the data shown in the graph):
    0.00 to 365.25: 2099.8021
    [A reasonable value for the given input, (shown in the graph above), since the values range around 5 ¾, and 365.25 * 5.75 gives 2100.1875.]
    Sample Input
    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
    Sample Output
    0.00 to 6.28: 4.7288
    Source

    样例输入

    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

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部