In the game of 20-card games, the objective is to select a card or pass on it at every turn, with the goal of maximizing the sum of the numbers on the chosen cards. You have knowledge of the numbers on all cards for the entire game and We know the order in which they will appear. However, there is one rule to keep in mind: if you choose four cards in consecutive turns, you must pass on the following two cards. This is the only rule in the game.
The numbers will come in this order:
To illustrate the rule more clearly, if you select 5, 3, 5, 4, then you must skip the next two cards, which are 8 and 7.
What is the highest possible total that can be obtained from these numbers and their arrangement with the given rule?
and the second question is that
What is the highest possible total that can be obtained from these numbers if you play the game with the same 5 decks in a row with the same orders coming after and after?
in total 100 numbers.