提交时间:2024-04-06 09:32:59

运行 ID: 141658

#include<bits/stdc++.h> using namespace std; long long he=0,he2=0; char a[10005],b; int main() { while(cin>>b) { if(b!='#'&&b!='@') { a[he++]=b; } else if(b=='#') { if(!he==0) { he--; } } else if(b=='@') { if(!he==0) { he=0; } } } while(!he==0) { cout<<a[he2++]; he--; } return 0; }