675356 2912 202375 9228 9736 1293
Even though the sequence of cards is represented in the input file, in actual play you are not aware of which cards will come next. Therefore, your algorithm must be greedy: choosing one of the best plays of the given hand irrespective of how that may benefit or cost the value of a later hand.
After you play, the cards you play are discarded, but the two remaining are left for the next round of cards.
Your score is the sum of penalties for each hand.
where there are no intervening spaces. Leading zeros are printed
for each number on the left. After a game, the total penalty should be
printed, in the form:
For the example input file, a correct output sequence would be:
65+35=100 79+21=100 score: 0 23+75=98 02+98=100 22+79=101 31+69=100 score: 3Note that there are potentially many correct optimal plays corresponding to a given game.