Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
118359 | 唐钧 | 行编辑程序 | C++ | 编译错误 | 0 | 0 MS | 0 KB | 340 | 2023-12-30 08:23:41 |
#include<bits/stdc++.h> using namespace std; stack<int>q; int main() { char s; while(cin>>s!=) { if(s!='#'&&s!='@') { q.push(s); } else if(s=='#') { q.pop(); } else { while(!q.empty()) { q.pop(); } } } while(!q.empty()) { cout<<q.top(); q.pop(); } return 0; }