[백준 / BOJ] 2133 타일 채우기 C++
·
알고리즘/DP
문제 설명DP 문제입니다.3×N 크기의 벽을 2×1, 1×2 크기의 타일로 채우는 경우의 수를 구해보자. 제한 사항풀이  전체 코드 #include using namespace std;const int MAX = 31;int N;int DP[MAX] = {0, };int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> N; DP[0] = 1; DP[2] = 3; if(N%2 == 1) { cout