Track the cumulative exercise load over a week and report the minimum, maximum, and chosen-day totals.
Greg performs a workout routine for 7 days. On the -th day, he does a certain number of exercises. The workout names may be different, but the task is always the same: compute the cumulative number of exercises after each day and determine the minimum, maximum, and final results needed by the judge.
Given the number of exercises Greg does on each of the 7 days, find the total number of exercises after the full week and identify the smallest and largest values among the running totals.
This is a straightforward implementation problem centered around accumulating values across an array of fixed size.
Example 1
Input
2 1 1 2 3 2 1
Output
2 3 12
Explanation
The running totals are 2, 3, 4, 6, 9, 11, 12. The minimum is 2, the maximum is 12, and the final total is 12.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.