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

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

Mini Tetris

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

요약
세 가지 종류의 도형이 최대 1000개 떨어질 때, 빈 줄이 다섯 개 쌓이지 않도록 배치해 어떤 순서로 도형이 나와도 이기는 방법을 찾는다.
난이도

보통10점 중 5점

유형
시뮬레이션, 그리디, 구현
정답자
아직 제출이 없습니다

문제

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:

TypeFigure
1
2
3

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.

예제

이 문제는 공개된 예제가 없습니다.