Tarefa12/main.cpp
Travel find_cheapest(vector<Travel>& travels, vector<vector<string> >&alliances){
  Travel result;
  if(travels.size()>0){
    result = travels.back();
    travels.pop_back();
  }else
    return result;
  while(travels.size()>0){
    Travel temp = travels.back();
    travels.pop_back();
    if(compute_cost(temp, alliances) < compute_cost(result, alliances)){
      result = temp;
    }
  }
  return result;
}
/**
 * \fn Travel find_cheapest(vector<Travel>& travels, vector<vector<string> >&alliances)
 * \brief Finds the cheapest travel amongst the travels's vector.
 * \param travels A vector of acceptable travels
 * \param alliances The alliances
 * \return The cheapest travel found.
 */
\fn Travel find_cheapest(vector& travels, vector >&alliances)
\brief Finds the cheapest travel amongst the travels's vector.
\param travels A vector of acceptable travels
\param alliances The alliances
\return The cheapest travel found.
\ fn Travel find_cheapest ( vector& travels vector > &alliances ) \ brief Finds the cheapest travel amongst the travels ' s vector . \ param travels A vector of acceptable travels \ param alliances The alliances \ return The cheapest travel found .
Travel find_cheapest(vector<Travel>& travels, vector<vector<string> >&alliances){
  Travel result;
  if(travels.size()>0){
    result = travels.back();
    travels.pop_back();
  }else
    return result;
  while(travels.size()>0){
    Travel temp = travels.back();
    travels.pop_back();
    if(compute_cost(temp, alliances) < compute_cost(result, alliances)){
      result = temp;
    }
  }
  return result;
}
Travel find_cheapest ( vector < Travel > & travels , vector < vector < string > > & alliances ) { Travel result ; if ( travels . size ( ) > 0 ) { result = travels . back ( ) ; travels . pop_back ( ) ; } else return result ; while ( travels . size ( ) > 0 ) { Travel temp = travels . back ( ) ; travels . pop_back ( ) ; if ( compute_cost ( temp , alliances ) < compute_cost ( result , alliances ) ) { result = temp ; } } return result ; }
\fn Travel find_cheapest(vector<Travel>& travels, vector<vector<string> >&alliances)
 \brief Finds the cheapest travel amongst the travels's vector.
\ fn Travel find_cheapest ( vector<Travel > & travels vector<vector<string > > &alliances ) \ brief Finds the cheapest travel amongst the travels ' s vector .