1hdu022专题

1hdu022数据结构堆栈-火车进站

/*判断一串序列能否按照堆栈的方式,进出栈之后得到另外一组序列*/ /*要把题目当做已知进出序列进行对比*/ #include<iostream>#include<cstdio>#include<cstring>using namespace std;struct node{char st[4];}str[10000];int main(){int n,i,j,t,k,ok