#P2422. 良好的感觉
良好的感觉
Description
{{kkk built a human sensation analyzer. Each day, a person has a feeling value ; the larger , the more comfortable the person feels. Over a time segment , a person's comfort level is defined as the feeling value on the least comfortable day in the sum of the feeling values of all days in . Now, given kkk's feeling values over consecutive days, which time segment makes kkk feel the most comfortable?}}
Input Format
{{The first line contains , the number of days for which data was recorded. The second line contains integers, the feeling value of each day.}}
Output Format
{{Output one line: the comfort value of the most comfortable time segment.}}
6
3 1 6 4 5 2
60
Hint
{{kkk's most comfortable time segment is from day to day , comfort value: .
Constraints:
- For of the testdata, .
- For of the testdata, .
- For of the testdata, , feeling value .}}
Translated by ChatGPT 5
京公网安备 11011102002149号