Topic description stack is a commonly used data structure. There are n elements waiting for the stack to be pushed to the top side of the stack, and the other side of the stack is an output stack sequence. You already know that there are two stack operations: push and pop. The former is to add an element to the stack, and the latter is to pop up the top element of the stack. Now we need to use these two operations to obtain a series of output sequences from one operation sequence. Please program to find the given n, calculate and output the sequence of numbers 1, 2 ,......, N, the total number of output sequences that may be obtained after a series of operations. Enter an integer n (1 <=n <= 15 ). Output an integer, that is, the total number of possible output sequences. Example input 3 example output 5 this is a topic of our oj. I spoke about stack today in the dormitory yesterday and wrote several questions. Sometimes I saw this question and I did not do it myself, I just wanted to do it. At first I had no idea, But I drew a picture on the paper to understand it. Regular [cpp] # include <stdio. h> # include <string. h> # include <math. h> long int a [21]; long int chan [21]; int main () {int I, j, n, m, t, x; long int s; scanf ("% d", & n); memset (a, 0, sizeof (a); if (n = 1) {printf ("1 \ n");} else if (n = 2) {printf ("2 \ n");} else {a [3] = 1; a [2] = 1; for (I = 4; I <= n; I ++) {for (j = 1; j <= 20; j ++) {chan [j] = a [j];} memset (a, 0, sizeof (a); for (j = 1; j <= 20; j ++) {if (chan [j]! = 0) {t = chan [j]; for (x = j + 1; x> = 2; x --) {a [x] + = t ;}}}} for (I = 1, s = 0; I <= 20; I ++) {s + = I * a [I];} printf ("% lld \ n ", s);} return 0 ;}