시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 (추가 시간 없음) | 1024 MB | 207 | 150 | 135 | 75.419% |
Jake is learning how to play the card game Dominion. In Dominion, you can buy a variety of treasure, action, and victory point cards - at the end of the game, the player with the most victory points wins!
Each turn, each player draws 5 cards and can use their action and treasure cards to obtain buying power in order to buy more cards. Since Jake is just starting out, he's decided to buy only treasure and victory point cards.
This means the cards he can buy are:
And, there are $3$ kinds of treasure cards:
At the start of Jake's turn, he draws $5$ of these cards. Given the number of Golds, Silvers, and Coppers in Jake's hand, calculate the best victory card and best treasure card he could buy that turn. Note that Jake can buy only one card.
The input consists of a single test case on a single line, which contains three non-negative integers $G$, $S$, $C$ ($G + S + C \le 5$) indicating the number of Golds, Silvers, and Coppers Jake draws in his hand.
Output the best victory card and the best treasure card Jake can buy this turn, separated with " or "
, in this order. If Jake cannot afford any victory cards, output only the best treasure card he can buy.
0 1 0
Estate or Copper
2 1 0
Province or Gold
0 0 1
Copper
In Sample Input 1, Jake has $1$ Silver in his hand, which means he has $2$ buying power. This would allow him to either buy an Estate or a Copper.
High School > Virginia Tech High School Programming Contest > 2017 Virginia Tech High School Programming Contest K번