아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Interactive Knockout

시간 제한2초메모리 제한512 MB

요약
플레이어가 떠난 칸이 사라지는 육각 격자에서 무작위로 움직이는 상대를 t번의 독립적인 라운드 모두 이겨야 한다.
난이도

보통10점 중 7점

유형
그래프, 게임 이론, 시뮬레이션
정답자
아직 제출이 없습니다

문제

This is an interactive problem. You are to defeat a randomly moving jury in a series of independent rounds of the game.

The game is played on a hexagonal field with axial coordinates. The field is bounded by a hexagon with vertices in cells (n,0)(n, 0), (0,n)(0, n), (−n,n)(-n, n), (−n,0)(-n, 0), (0,−n)(0, -n), and (n,−n)(n, -n). In all test cases, except for the sample test case in this statement, which is not present in the real test set, n=20n=20.

There are two players --- you and the jury. You start in the cell (−n/2,0)(-n/2, 0) and the jury starts in the cell (n/2,0)(n/2, 0). Players take turns, you move first.

A field for n=4n=4 (the blue cell is your starting cell and the red cell is the starting cell for the jury).

At each turn, the player moves to any cell adjacent by side, which does not contain the opponent and has not been destroyed. After that, the previously occupied cell is destroyed and is not available to players on the following turns anymore. The player who cannot move to any adjacent cell loses the game.

The jury did not come up with any smart algorithm to play this game, so they've decided to move equiprobably randomly to any valid adjacent cell on each turn.

You need to show your complete dominance --- win all of tt independent rounds of the game.

힌트

Note that the interaction in the sample test case results in the "Wrong answer" verdict, as only 1 round out of 2 is won. The two rounds played are shown below.

The starting player wins (on the left) and loses by making an invalid move (on the right).

예제1

  1. 예제 1

    입력
    2 4
    
    move -1 1
    
    move -1 1
    
    move -1 1
    
    move 0 1
    
    move -1 0
    
    win
    
    move 0 -1
    
    move -1 0
    
    lose
    
    예상 출력
    
    0 1
    
    0 1
    
    0 1
    
    -1 0
    
    -1 1
    
    1 0
    
    1 0
    
    1 -1
    
    1 0