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

31377번 - Child's Game with Robot 다국어인터랙티브

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB241644121.809%

문제

This is an interactive problem.

Little Misha plays a child's game with a robot. In this game, the robot stands on a field which is divided into 3ドル \times 3$ squares and surrounded by borders. The game begins at the center squares and consists in making ten actions. Each action is either declamation of a phrase or an attempt to move into one of the neighboring squares. Declamation is used to wait, or simply for amusement.

One of the squares is special, but Misha does not know in advance which one. The robot reports when it moves into the special square. The goal of the game is to move into the special square precisely during the tenth action.

To communicate with the robot, Misha uses text input and output. The following commands are recognized:

  • echo phrase --- declamation of phrase,
  • move north --- moving one square to the north,
  • move east --- moving one square to the east,
  • move south --- moving one square to the south,
  • move west --- moving one square to the west.

For each declamation command, the robot loudly reads the given phrase, and also prints it back in text. During a declamation, the robot does not move. The robot is guaranteed to correctly handle phrases which consist of characters with ASCII codes from 32ドル$ to 126ドル$ inclusive and are at most 256ドル$ characters long.

For each movement command, the robot prints back one of the four words:

  • bump if instead of moving, the robot hit a barrier, in which case, it remains on the same square,
  • moved if the robot successfully moved into a common square,
  • found if the robot moved into the special square during one of the first nine actions,
  • win if the robot moved into the special square during the tenth action.

Help Misha to play this game in such a way that, during the tenth action, the robot prints the desired word win.

인터랙션 프로토콜

The solution must print commands to the standard output, one command per line. To prevent output buffering, flush the output buffer after each command you issue: this can be done by using, for example, fflush(stdout) in C or C++, System.out.flush() in Java, flush(output) in Pascal or sys.stdout.flush() in Python.

The answer for each command is printed back to the solution's standard input on a separate line.

After printing ten commands, the solution must terminate correctly.

입력

출력

제한

예제 입력 1

move north
move east
move south
move west
move east
move east
move south
echo Ready!
echo Steady...
move north

예제 출력 1

moved
moved
found
moved
found
bump
moved
Ready!
Steady...
win

In the given example, the special square lies to the east from the center. It is guaranteed that this test will be the first when checking your solution.

The commands (solution's output) are given on the left, and the answers for them (solution's input) are on the right.

노트

In each test, the special square is selected in advance and does not change during the contest.

출처

Contest > Open Cup > 2014/2015 Season > Stage 13: Grand Prix of Three Capitals E번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

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

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