摘要: 注意输出格式 1 /*对于已经给出的入栈顺序判断出栈顺序是否正确*/ 2 3 #include<iostream> 4 #include<stack> 5 #include<cstdio> 6 using namespace std; 7 const int num = 1000 + 10; 8 i 阅读全文
posted @ 2020-04-10 13:01 _Dinosaur_Po 阅读(100) 评论(0) 推荐(0)
摘要: 卡特兰数又称卡塔兰数,卡特兰数是组合数学中一个常出现在各种记数问题中的数列。 原理: 设h(n)为catalan数的第n+1项,令h(0)=1,h(1)=1,catalan数满足递推式 : h(n)= h(0)*h(n-1)+h(1)*h(n-2) + ... + h(n-1)*h(0) (n>=2 阅读全文
posted @ 2020-04-10 10:55 _Dinosaur_Po 阅读(2685) 评论(1) 推荐(4)