Description: Optimized with a greedy heap, from the meaning of the questions, we can get the most violent solution is that every day, search the entire array, to find qualified experience in the subject and it is the biggest, so look for M-day fine. The next step is how to optimize in each time looking for the experience as long as we find the greatest, because the big top of the heap can be the subject of the organization can do, each time after the upgrade can be done by adding a new subject was OK.
To Search:
File list (Check if you may need any files):
3230.cpp