traverse from
> > the
> > > > > beginning.
> > >
> > > > > every time a book is removed, S becomes 1 smaller, so the
> > traversal
> > > > > time is something like (S/2 -1) * (S/2 - 2) * (S/2 -3) * ... 1
> > >
> > > > > you can also put them in a
think first define a matrix M,so M[i][j] is the result for
> how many ways to add parentheses to produce any character, fianlly
> the M[1][n] is the result for the problem above,but it will be very
> meomry cosumption, because M[i][j] has to record many kinds of
> situation,
> So