Algorithm Selection via Ranking