Activity Selection Problem Suppose we have a set S=fa,a2....n of n proposed acivities that wish to use a resoure,such as a lecture hall,which can serve only one activity at a time.Each activity a has a start time s;and a finish time fi,where 0si<fi<oo.If selected,activity ai takes place during the half-open time interval [si,).Activities a and a are compatible if the intervals [si,)and [s,)do not overlap.That is,ai and aj are compatible if s ors In the activity-selection problem,we wish to select a maximum-size subset of mutually compatible activities. 一个样本输入 5678 10 8 8 2 12 99 11 14Activity Selection Problem 一个样本输入: