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

26224번 - Karmon go 다국어

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

문제

As part of the import phaseout government plan in you-know-what country, a game called "Karmon go" was released; the game mechanics is based around karaoke monsters, the Karmons. Among other things, each karmon in the game has a battle power parameter --- the BP. BP can be increased by two means: by powering up the karmon and by evolving it into another karmon species. When a karmon is powered up, a certain constant is added to its BP, which depends only on the species of the karmon. When a karmon evolves, BP is multiplied by a certain factor, depending only on the species of the karmon into which it evolves. A karmon can be evolved only once, and can be powered up only a limited number of times. The player must use both methods of increasing his karmon's BP, but he's free to choose the order: to power up and then to evolve, or vice versa. The resulting BP depends on the chosen order.

Consider the following example: let a player have a Bichu karmon with a BP of 7ドル$. Powering up Bichu raises its BP by 5ドル$. Bichu can be evolved into Bikachu, multiplying its BP by 1ドル.6$. Powering up Bikachu raises its BP by 7ドル$. Let a player, for example, power his karmon up 3ドル$ times. First powering Bichu up and then evolving it results in a BP of $(7 + 3 \cdot 5) \cdot 1.6 = 35.2$. On the other hand, first evolving Bichu into Bikachu and subsequently powering it up brings its BP to 7ドル \cdot 1.6 + 3 \cdot 7 = 32.2$. It turns out that in the current example powering up followed by evolving is more advantageous.

Help our rookie players figure out the best strategy to develop their karmons: powering up then evolving or vice versa.

입력

The input file consists of a single line describing a karmon's features and its evolution in the following format: $name_0$ $inc_0$ $name_1$ $mul_1$ $inc_1,ドル

  • $name_0$ --- karmon name.
  • $inc_0$ --- integer constant added to the karmon's BP when powered up prior to evolution (1ドル \leq inc_0 \leq 10^6$).
  • $name_1$ --- karmon name after evolution.
  • $mul_1$ --- real number factor, by which the karmon's BP is multiplied after evolution (1ドル \leq mul_1 \leq 100$). The number contains no more than five decimal digits after decimal point.
  • $inc_1$ --- integer constant added to the karmon's BP when powered up after evolution (1ドル \leq inc_1 \leq 10^6$).

The name of any karmon can contain only Latin characters in upper and lower case. The length of the name should be no less than one and no longer than a hundred characters.

출력

The output file must contain the line "Power up, Evolve" or the line "Evolve, Power up" depending on which way of developing the karmon is more advantageous to achieve the highest BP: first power up and then evolve, or the opposite, respectively. If the order of powering up and evolution makes no difference, print the word "Whatever".

제한

예제 입력 1

Geevee 10 Gaporeon 2 20

예제 출력 1

Whatever

예제 입력 2

Geevee 10 Golteon 1.2 11

예제 출력 2

Power up, Evolve

예제 입력 3

Geevee 10 Glareon 1.3 14

예제 출력 3

Evolve, Power up

힌트

출처

Contest > Open Cup > 2016/2017 Season > Stage 2: Grand Prix of Eurasia 3번

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

출처

대학교 대회

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

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