Logo
(追記) (追記ここまで)

24803번 - Provinces and Gold 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB33324521677.143%

문제

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:

  • Province (costs 8ドル,ドル worth 6ドル$ victory points)
  • Duchy (costs 5ドル,ドル worth 3ドル$ victory points)
  • Estate (costs 2ドル,ドル worth 1ドル$ victory point)

And, there are 3ドル$ kinds of treasure cards:

  • Gold (costs 6ドル,ドル worth 3ドル$ buying power)
  • Silver (costs 3ドル,ドル worth 2ドル$ buying power)
  • Copper (costs 0ドル,ドル worth 1ドル$ buying power)

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.

제한

예제 입력 1

0 1 0

예제 출력 1

Estate or Copper

예제 입력 2

2 1 0

예제 출력 2

Province or Gold

예제 입력 3

0 0 1

예제 출력 3

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.

출처

School > Virginia Tech High School Programming Contest > 2017 Virginia Tech High School Programming Contest K번

  • 문제를 만든 사람: Aarav Singh
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /