Fifty cards are arranged on a table so that only the uppermost side of each card is visible. Each card bears two numbers, one on each side. The numbers range from 1 to 100, and each number appears exactly once.
Vasya must choose any number of cards and flip them over, and then add up the 50 numbers now on top. What’s the highest sum he can be sure to reach if
he has to flip all the cards that he wants to, simultaneously?
he can flip the cards one at a time?
Note: a card can be flipped at most one time.
Source: 1999 St. Petersburg City Mathematical Olympiad.