Created
April 15, 2020 11:04
-
-
Save niklasjang/00e59a8532460a15c67eaeb762824aaf to your computer and use it in GitHub Desktop.
[PS][DP]/[BOJ][11726][2*n타일링]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int n = 0; | |
int dp[1001] = { 0 }; | |
int main(void) { | |
int n = 0; | |
cin >> n; | |
dp[1] = 1; | |
dp[2] = 2; | |
for (int i = 3; i <= n; i++) { | |
dp[i] = (dp[i - 1] + dp[i - 2]) % 10007; | |
} | |
cout << dp[n]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment