Game of Falling Blocks
시간 제한: 1000ms메모리 제한: 512MB출처: GCPC 2019BOJ 18060
문제
In this problem you have to program a simple AI for the game Tetris. The objective is simple: complete at least one row. More specifically, for the purposes of this problem we play Tetris according to the following modified set of rules:
Figure G.1: The seven tetrominoes in their initial orientations.
- The playing area is a grid of height 20 and width 10, initially empty.
- One by one, the game presents the player with a random sequence of tetromino shaped pieces, as seen in Figure G.1. The game uses a bag randomiser for this, that is, the first seven pieces are all distinct, then the next seven pieces are distinct, and so on.
- The player may shift each piece sideways and rotate it by multiples of 90 degrees. These adjustments take place above the grid.
- The piece then drops down into the playing area and locks into place as soon as some part of it cannot drop any further because part of some previous piece is in the way. It is not possible to shift or rotate the piece during the drop.
- The game ends as soon as one of the following happens:
- A horizontal row of the grid is fully occupied by tetromino tiles, the player wins.
- Some piece does not fully drop into the grid, the player loses.
힌트
Figure G.2: Illustration of the example interaction.
예제
예제 1
입력
S O T J I W
출력
1 1 2 4 2 2 3 9 0 6
이 문제는 채점 준비 중입니다. 테스트 데이터가 확보되면 제출이 가능합니다.