#include<iostream>#include<cstdio>#include<fstream>#include<algorithm>#include<cmath>#include<deque>#include<vector>#include<queue>#include<string>#include<cstring>#include<map>#include<stack>#include<set>usingnamespacestd;
intmain(){
int i,j,m,n;
string arr;
deque<char>q;
while(getline(cin,arr))
{
for(i=0;i<arr.size();i++)
{
if(arr[i]=='#')
{
if(q.size())
q.pop_back();
}
elseif(arr[i]=='@')
{
while(q.size()) q.pop_back();
}
else
{
q.push_back(arr[i]);
}
}
while(q.size())
{
cout<<q.front();
q.pop_front();
}
cout<<endl;
}
return0;
}
sdut行编译器
最新推荐文章于 2024-08-22 15:48:46 发布