no the ACMICPC has 3 stalks and below that is the example I showed how ACMICPC has 3 stalks
CBACBACBA have 3 stalks because when you stalk them in order, it would be
cccc
bbbb
aaaa
I don't know if that make sense.
for the program, it is like a container arrives randomly and, the programming should take that data, and stalk the box(in this case the Alphas) in order in a minimum possible way.
The ACMICPC has 3 stacks and below that is the example I showed how ACMICPC has 3 stacks
CBACBACBA have 3 stacks because when you stack them in order, it would be
cccc
bbbb
aaaa
I don't know if that make sense.
for the program, it is like a container arrives randomly and, the programming should take that data, and stack the box(in this case the Alphas) in order in a minimum possible way.
So, you have a sequence of objects, that you need to be stacked. You've given us no information about the restraints you must operate under when this is done. In other words, there is not nearly enough information to provide you with a reasonable response.
Your problem may fall under the purview of a bin packing algorithm. You may want to google that and see if it can be of use to you.
This doesn't seem to have anything to do with C++.
you can stack another pack on top of the other one if there are only one type and the one after is greater alpha..ACMICPC has only one A, and when you check through, can't find another A, so the compiler moves to the the next box which is C, it checks if C >A if so it stacks it on top of A, Then moves to M, Yes M is < C but it can not stack it on top of C for there are other C's on the data(container) that has not been processed, so it creates another stack.
on the other hand if it was,
for example
ACMICPCA then this would have 4 stack because C can not be stack on top of A since there is an A data that is not been processed
AA
CCC
M
IP
does this make sense.. it is a bit hard to explain on here
Also... as a side effect of explaining the process to me,... you also have explained exactly what you need to do to accomplish this in a program. You laid out the step-by-step logic in your post... now all you need to do it take each of those steps and write the code for it.
So in explaining this... maybe you have answered your own question?