P10934 Watermelon Planting
Background
Benben: Little watermelons, little watermelons~
Passer-by A: No way. These watermelons are clearly big...
Benben: Then... big watermelons, big watermelons~
Passer-by A: You changed your words so fast...
Benben: Watermelons, watermelons~ Cute watermelons~
Description
Benben planted a watermelon field, but the planting area of this field is a straight line...
After some research, Benben came up with $m$ conclusions. These $m$ conclusions can maximize the number of watermelons he harvests.
Benben's conclusions are as follows:
From position $b$ to position $e$ in the field, at least $t$ watermelons must be planted, and then the harvest in this range can be maximized.
Benben does not want to work that hard, so he wants to plant as few watermelons as possible, while satisfying every conclusion he obtained.
Input Format
The first line contains two numbers $n$ and $m$ ($0
Output Format
Output the minimum number of watermelons Benben needs to plant.
Explanation/Hint
Basically, Benben's watermelon field is a spectacular line...
Translated by ChatGPT 5