| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 (추가 시간 없음) | 1024 MB | 189 | 104 | 93 | 55.357% |
A guy named Gry found a new game called "Mini-Tetris 3023". This small version of Tetris is played on a very long grid only 2ドル$ cells high and has just three types of tile:
square made out of 4ドル$ tiles in a 2ドル \times 2$ grid.S-tile made out of 4ドル$ tiles, 2ドル$ on one row and 2ドル$ slightly offset on the othercorner made out of 3ドル$ tiles, 1ドル$ on one row and 2ドル$ on the otherTiles may be rotated 0ドル,ドル 90ドル,ドル 180ドル,ドル or 270ドル$ degrees to fit amongst each other, however, they cannot overlap or go outside the vertical boundary of the grid.
This game provides $a$ squares, $b$ S-tiles, and $c$ corners. Gry would like to beat the high score by creating the largest-possible contiguous 2ドル \times n$ rectangle out of some or all of the provided tiles, without any tiles overlapping or sticking out of the rectangle.
Output the maximum possible width of the grid, $n,ドル that can be perfectly filled by some or all of the given tiles without overlapping or overstepping the boundaries.
2 2 2
11
1 1 1
2
0 0 0
0