Algospot

GRID

Haeine 2017. 10. 17. 17:15

<문제 링크>

https://algospot.com/judge/problem/read/GRID

 

문제

We wish to tile a grid 4 units high and N units long with rectangles (dominoes) 2 units by one unit (in either orientation). For example, the figure shows the five different ways that a grid 4 units high and 2 units wide may be tiled.

judge-attachments/395dc9ee18ebdf27621e2b86d17b7fab/1111.jpg

Write a program that takes as input the width, W, of the grid and outputs the number of different ways to tile a 4-by-W grid.