#Doing home work again
Title Link: Click here~~
There are n assignments, and each assignment has its own deadline. When the deadline is exceeded and the assignment has not been completed, the corresponding score will be deducted. Ask how you can minimize points.
n-door assignments are sorted by score from large to small, and then each assignment is arranged on the day closest to its deadline (first arranged on the deadline day, if there is already arrangement on that day, look for the day ahead), and this day is marked as used, if not, points will be deducted.
Sort the dates from small to large first. If the dates are the same, the ones with more points will be in the front. If there are more points deducted on the same date, use the previous time to do the work with less points deducted; if there are no smaller ones, deduct the points of the work. On, which is much better than the previous algorithm.