1636 Education reform topics Source: Codeforces Benchmark time limit: 1 seconds space limit: 131072 KB score: 20 Difficulty: 3-level algorithm topic collection attention
Recently, a school is implementing educational reform.
A school year is made up of n days. A school has m courses, each day students must learn a course, a course must be completed in one day. After completing the Class I course, the students receive the XI homework, where Xi is an integer in the interval [Ai,bi]. Each course also has an attribute, which is the complexity of CI. A schools now have to make their timetable, the specific requirements are as follows:
• In the curriculum, as the number of days increases, the degree of complexity of the course is strictly incremental.
• In addition to the 1th day, the daily amount of work must be K times the day before, or more than the previous one K-jobs. (assuming that the number of jobs in the first day is XI, then for I (1
Now, given the number of days n, the coefficient k, and the M-gate course of the Ai,bi,ci (1≤i≤m). A requirement to calculate the maximum total amount of work (the total number of operations) that can be arranged for a school year