#P2367. 语文成绩
语文成绩
Description
The Chinese teacher always writes scores wrong, so when she corrects them, she gets exhausted. She keeps adding points again and again to certain students, and she also needs to keep track of the minimum score. Can you help her?
Input Format
The first line has two integers , , representing the number of students and the number of additions.
The second line has numbers, , representing each student's initial score.
The next lines each have three numbers, , , , representing adding points to each student from the -th to the -th, inclusive.
Output Format
Output only one line, representing the class minimum score after the changes.
3 2
1 1 1
1 2 1
2 3 1
2
Hint
For of the testdata, .
For of the testdata, .
For of the testdata, .
For of the testdata, , , initial scores , .
Translated by ChatGPT 5
京公网安备 11011102002149号