Input 每次输入一个数n(1<=n<=35),当n等于-1时结束输入。
Output 对于每个输入数据输出路径数,具体格式看Sample。
Sample Input
1 3 12 -1
Sample Output
1 1 2 2 3 10 3 12 416024
Author Rabbit
卡特兰数列:
#includeusing namespace std; _int64 dp[37][37]; int main() { freopen("C:\\in.txt","r",stdin); for(int i=0;i<=36;i++)dp[i][0]=1; for(int i=1;i<=36;i++) for(int j=1;j