Mini Tetris
시간 제한2초메모리 제한512 MB
세 가지 종류의 도형이 최대 1000개 떨어질 때, 빈 줄이 다섯 개 쌓이지 않도록 배치해 어떤 순서로 도형이 나와도 이기는 방법을 찾는다.
문제
As you may know, the popular computer game “Tetris” was invented by Russian programmer Alexey Pajitnov. In this problem you need to write program which plays a simplified version of this game.
The playing field is a rectangular vertical shaft, called the “well”. Random figures of unit square blocks appear on top of the wall, the player chooses the horizontal position and rotation of the figure, after that the figure falls down in the well. The objective of the game is to create horizontal lines filled without gaps. When such a line is created, it disappears, and any blocks above the deleted line fall.
In this version of the game, the well size units, and there are only three types of figures:
You lose if at some point there are five non-empty lines of the well. You win if you hadn't lost after n figures have fallen.
You need to write program which plays the game described above and wins regardless of which figures will appear.
제한
In all subtasks n ≤ 1000.
예제
이 문제는 공개된 예제가 없습니다.


