注意这种情况
入 1 2 3
出 2 1 3
可以是入了 1 和 2
再接着出2 1
其实关键就是这行代码
while (stk.size() && b[r] == stk.top()) { stk.pop(); ++r; }
是while而不是if