Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void lock_pairs(void)
- {
- int edge[candidate_count];
- for (int i = 0; i < candidate_count; i++)
- {
- edge[i] = 0;
- }
- for (int i = 0; i < pair_count; i++)
- {
- int m = 0;
- edge[pairs[i].loser] = 1;
- for (int j = 0; j < candidate_count; j++)
- {
- m += edge[j];
- }
- if (m == candidate_count)
- {
- edge[pairs[i].loser] = 0;
- }
- else
- {
- locked[pairs[i].winner][pairs[i].loser] = true;
- }
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement