BOJ
[BOJ/C++/11727] 2 x n 타일링 2
#include using namespace std; int chk[1001]; int dp(int x){ if(x==1) return 1; if(x==2) return 3; if(chk[x]>0) return chk[x]; return chk[x]=(dp(x-1)+dp(x-2)*2)%10007; } int main(){ int n; scanf("%d",&n); printf("%d",dp(n)); return 0; }