PivotOJ

Even Odd Game

시간 제한: 4000ms메모리 제한: 1024MB출처: GCPC 2024BOJ 32481

문제

As every Saturday, Eve is paying her local game club a visit. Today, Bob has brought a new game he has designed on his own. After thorough investigation, you claim that there exists a dominant strategy, so one player can always win. Bob is hesitant to accept that his game is boring to play, so he challenges you to play a round! Since you claim that there exists a dominant strategy, you may determine who begins the game.

Figure E.1: The cards in the two sample interactions.

The rules are as follows. There are nn cards on the table, each containing a maths operation (+ or *) and an integer, as shown in Figure E.1. Eve and Bob alternate picking cards to manipulate a common number using one of the cards. For instance, if the current value of the number is 55, and the card says +3+3, then the value gets updated to 88. Each card can only be used once, and the game ends when all the cards have been used. The player who makes the first move wins if the final number is odd, and the other player wins if the final number is even. Given the list of cards and the starting value, help Eve win the game.

예제

예제 1

입력
3
+ 7
* 4
+ 2
1


* 4
출력
me
+ 2

+ 7

예제 2

입력
2
+ 8
* 5
10

+ 8
출력
you

* 5
이 문제는 채점 준비 중입니다. 테스트 데이터가 확보되면 제출이 가능합니다.