max_pair_wins = max(pair_wins) winners = [candidates[i] for i, pair_wins_i in enumerate(pair_wins) if pair_wins_i == max_pair_wins]

if (locked[loser][i]) // If loser has an edge to i

If you’re stuck, run check50 after completing each function, use printf debugging to see the state of preferences and pairs , and draw the cycle detection logic on paper.


Cs50 Tideman SolutionПодпишитесь на рассылку и получайте первым информацию о предстоящих мероприятиях

Cs50 Tideman Solution
+