Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n = 23;
- int m = 15;
- int dp[n+2][m+2];
- for(int i=0;i<n;i++){
- for(int j=0;j<m;j++){
- dp[i][j]=0;
- }
- }
- dp[0][0]=1;
- for(int i =0;i<n;i++){
- for(int j=0;j<m;j++){
- dp[i+2][j+1] +=dp[i][j];
- dp[i+1][j+2] += dp[i][j];
- }
- }
- cout<<dp[n-1][m-1];
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement