#P1614. 爱与愁的心痛
爱与愁的心痛
Description
Recently there are unpleasant events, and each one has a positive integer sting value (his tolerance is extremely low). The guru "Ai Yu Chou" wants to know the minimum sum of consecutive sting values. Because he is busy, he asks you to write a program to tell him.
Input Format
The first line contains two space-separated integers, and .
Lines to each contain one integer. For , line contains an integer , the sting value of the -th event.
Output Format
Output one line with a single integer: the minimum sum of any consecutive sting values.
8 3
1
4
7
3
1
2
4
3
6
Hint
Constraints
- For of the testdata, it is guaranteed that .
- For of the testdata, it is guaranteed that .
- For of the testdata, it is guaranteed that .
- For of the testdata, it is guaranteed that , .
Translated by ChatGPT 5
京公网安备 11011102002149号