title: Algorithm for achieving best finish time for a team in a triathlon race
body: <p>Teacher plans a race, each contestant must complete 20laps of swimming, followed by 10kms cycling followed by 3kms running. For example In other words, first one contestant swims the 20 laps, gets out, and starts biking. As soon as this first person is out of the pool, a second contestant begins swimming the20 laps; as soon as he or she is out and starts biking, a third contestant begins swimming . . . and so on</p>
  
  <p>Each contestant has a projected swimming time means expected time to complete 20 laps of swimming, also each contestant has projected cycling and running time. The question is design a schedule for race i.e and order in which to sequence the starts of contestant. The participant can bike and race simultaneously but at most only person can be in the pool.</p>
  
  <p><strong>Question: design an efficient algorithm to schedule the above task ?
      Also a program to prove the algorithm is right.</strong></p>
  
  <p><strong>Attempted solution:</strong>
  I have come up with this idea : 
  Initialize the contestants from 1 to n,
  Let si, bi, ri denote the swimming, cycling and running time contestant i .
  We arrange the contestant in decreasing order of the time taken to cycle+time taken to run and send them in this order.
  Iam not able to formulate the the algorithm and program  properly, so need help with that.</p>