Out of curiosity, I checked the problem posed to the 2009 ACM International Collegiate Programming Contest. The questions are pretty interesting. They are available at http://cm.baylor.edu/resources/pdf/2009Problems.pdf . I could not come up with an algorithm that solved problem 1, which I will reproduce here. This caused a lively discussion in the office, and we think that we are pretty close to the answer, but we would really appreciate if someone could find / develop a complete solution (no code required).
I will reproduce the problem here for your convenience:
Problem 1
Consider the problem of planning aircraft that land at the airport. Incoming aircraft report their positions, directions and speeds, and then the dispatcher has to develop a landing schedule that safely transfers all planes to the ground. As a rule, the longer the time between successive landings, the “safer” the landing schedule. This extra time gives pilots the opportunity to respond to changing weather and other surprises. Fortunately, part of this planning task can be automated - here you go. You will be given landing scripts. Each aircraft has a time window during which it can land safely. You must calculate the landing order for all aircraft observing these time windows. In addition, aircraft landings should be as long as possible,so that the minimum time interval between successive landings is as large as possible. For example, if three planes land at 10:00, 10:05 and 10:15, the smallest gap is five minutes, which happens between the first two planes. Not all spaces should be the same, but the smallest gap should be as large as possible.
, . , n (2 ≤ n ≤ 8), . n , a i, b i, [a i, b i], i- . a i b i 0 ≤ a i ≤ b i ≤ 1440,
, .
( 1), . , , . .
3
0 10
5 15
10 15
2
0 10
10 20
0
Case 1: 7:30
Case 2: 20:00