DWITE Online Computer Programming Contest, February 2008, Problem 5
You are working on a part of Tetris! playing AI that figures out the best move for the current piece, and one part of the information required for this decision is knowing the maximum number of lines that the current piece can score on a given board.
The board size is
#
- piece on a board.
- empty spot
Pieces in play are standard Tetris pieces, and the current game piece will be described in a
....
.##.
##..
....
The input will come in 5 sets, repeating the following pattern:
The output will contain 5 lines – a maximum number of lines that a piece can score.
Note: The piece starts dropping from above the supplied
Sample Input
....
.#..
.###
....
..........
..........
..........
#####..###
##.##.####
#####.####
Sample Output
2
Problem Resource: DWITE
Comments
What does it mean by, "cannot be moved sideways"? The only way to get two lines is to rotate the piece.
its so that once you "drop the pice" that is its commitment. you cannot change is trajectory and squeeze it into other spots