Created
February 9, 2017 08:05
-
-
Save SuhasHebbar/d0df5b48cbd789b3c115e3c04172c188 to your computer and use it in GitHub Desktop.
chk
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; | |
uintmax_t arr[74][74]; | |
uintmax_t bs(int a,int b) { | |
uintmax_t ans=0; | |
for (int i = 1; i <=b; ++i) | |
{ | |
if(arr[a-1][i]==0) | |
arr[a-1][i]=bs(a-1,i); | |
ans+=arr[a-1][i]; | |
} | |
return ans; | |
} | |
int main() { | |
int t; | |
cin>>t; | |
//long long arr[t+1][t]{0}; | |
for (int i = 0; i < t; ++i) | |
{ | |
arr[1][i]=i; | |
} | |
for (int i = 0; i <= t; ++i) | |
{ arr[i][1]=1; | |
} | |
cout<<bs(t,t-1)<<endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment