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

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

Filling Shapes

시간 제한1초메모리 제한1024 MB

요약
3 x n 격자를 L자 모양 트로미노로 빈칸 없이 채우는 경우의 수를 구한다. n은 60 이하이다.
난이도

보통10점 중 4점

유형
동적 계획법, 조합론
정답자
아직 제출이 없습니다

문제

You have a given integer nn. Find the number of ways to fill all 3×n3 \times n tiles with the shape described in the picture below. Upon filling, no empty spaces are allowed. Shapes cannot overlap.

This picture describes when n=4n = 4. The left one is the shape and the right one is 3×n3 \times n tiles.

입력

The only line contains one integer nn (1≤n≤601 \le n \le 60) --- the length.

출력

Print the number of ways to fill.

힌트

In the first example, there are 44 possible cases of filling.

In the second example, you cannot fill the shapes in 3×13 \times 1 tiles.

예제2

  1. 예제 1

    입력
    4
    
    예상 출력
    4
    
  2. 예제 2

    입력
    1
    
    예상 출력
    0