Use Algorithm 1 to determine the maximum number of total attendees in the talks in Example 6 if $w_{i}$ , the number of attendees of talk $i, i=1,2, \ldots, 7,$ is
$$
\begin{array}{l}{\text { a) } 20,10,50,30,15,25,40} \\ {\text { b) } 100,5,10,20,25,40,30} \\ {\text { c) } 2,3,8,5,4,7,10} \\ {\text { d) } 10,8,7,25,20,30,5}\end{array}
$$