예제 #1
0
ContestResult
OLCTriangle::CalculateResult(const ContestTraceVector &solution) const
{
  ContestResult result;
  result.time = n_points > 0
    ? fixed(GetPoint(n_points - 1).DeltaTime(GetPoint(0)))
    : fixed(0);
  result.distance = is_complete
    ? CalcLegDistance(solution, 0) + CalcLegDistance(solution, 1) + CalcLegDistance(solution, 2)
    : fixed(0);
  result.score = ApplyHandicap(result.distance * fixed(0.001));
  return result;
}
예제 #2
0
ContestResult
OLCTriangle::CalculateResult() const
{
  ContestResult result;
  result.time = (is_complete && is_closed)
    ? solution[4].DeltaTime(solution[0])
    : 0.;
  result.distance = (is_complete && is_closed)
    ? CalcLegDistance(solution, 0) + CalcLegDistance(solution, 1) + CalcLegDistance(solution, 2)
    : 0.;
  result.score = ApplyHandicap(result.distance * 0.001);
  return result;
}
예제 #3
0
ContestResult
OLCTriangle::CalculateResult() const
{
  ContestResult result;
  result.time = n_points > 0
    ? fixed(GetPoint(n_points - 1).DeltaTime(GetPoint(0)))
    : fixed_zero;
  result.distance = is_complete
    ? CalcLegDistance(0) + CalcLegDistance(1) + CalcLegDistance(2)
    : fixed_zero;
  result.score = ApplyHandicap(result.distance * fixed(0.001));
  return result;
}