I need help in a greedy problem which is like this :
I have pairs of numbers like (x y)
I know the number of pairs and I know that the first number is bigger than the second one.
I have to choose n/2 xs and n/2 ys to get the lowest sum, knowing that if I choose x from a pair, I can't choose y from the same pair.
I don't what code references, I just want a point to a principle.