#C11074. Maximum Bonus Points for Checkpoints
Maximum Bonus Points for Checkpoints
Maximum Bonus Points for Checkpoints
You are given a sequence of checkpoints in a marathon. For each checkpoint, there is a recorded time and a bonus point value. Although the times are provided, they are not used in any decision-making process—the runner collects the bonus points at every checkpoint. Your task is to compute the maximum bonus points that the runner can accumulate, which is simply the sum of all bonus points.
Mathematically, if there are (n) checkpoints and the bonus points are given by (b_1, b_2, \dots, b_n), the maximum bonus points is given by: [ \text{MaximumBonus} = \sum_{i=1}^{n} b_i ]
Input and output are taken from standard input and standard output respectively.
inputFormat
The input consists of three lines:
- The first line contains an integer (n) representing the number of checkpoints.
- The second line contains (n) space-separated integers representing the time taken to reach each checkpoint. (These values will not be used in the calculation.)
- The third line contains (n) space-separated integers representing the bonus points at each checkpoint.
outputFormat
Output a single line containing the maximum bonus points that can be collected, which is the sum of all bonus points.## sample
5
1 2 3 4 5
10 20 30 40 50
150
</p>