原题题目
代码实现
int countOrders(int n){
int i,mod = 1000000007,temp;long pre = 1,now = 1;for(i=1;i<n;i++){
pre = now,temp = i*2+1;now = ((temp+1) * temp * pre /2) % mod; }return now;
}
int countOrders(int n){
int i,mod = 1000000007,temp;long pre = 1,now = 1;for(i=1;i<n;i++){
pre = now,temp = i*2+1;now = ((temp+1) * temp * pre /2) % mod; }return now;
}