| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 4 | 2 | 2 | 50.000% |
The goal of this problem is simple: given a set of two-dimensional blocks, determine the least number of blocks necessary to construct them in a given configuration, if possible. All blocks have a width of 1, but the length will vary. The blocks themselves are stacked similar to Tetris, in that they are dropped from the top and will fall until any part of the falling block has collided with the ground or a preexisting block. The blocks may be selected in any order, moved left or right as needed, and they can be rotated.
You are limited to the number and lengths of blocks provided by the data. Not all configurations can be achieved with the given blocks.
The first line of input will contain a single integer n that indicates the number of data sets to follow. Each data set will consist of:
If it is possible to stack the available blocks in the given configurations, print the least number of blocks that could be used to accomplish this. If it is not possible, print “Not Possible.”
2 5 5 ..... ##### ...#. ...#. #..#. 1 3 2 1 4 7 7 ....... ....### .#...## .#...#. ###..#. ..#..#. ..#..#. 1 2 2 2 2 3 3 4 5
Not Possible. 6
School > PLU High School Programming Contest > PLU 2019 > Advanced 10번