Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
141706 | | 行编辑程序 | C++ | 运行超时 | 0 | 1000 MS | 480 KB | 391 | 2024-04-06 10:06:54 |
#include <bits/stdc++.h> using namespace std; stack <char> n; stack <char> tmp,in; void clean(){ while(!n.size()) n.pop(); } int main(){ char t; while(1){ t=getchar(); if(!t) break; if(t!='#'&&t!='@') n.push(t); if(t=='#') n.pop(); if(t=='@') clean(); } while(!n.size()){ tmp.push(n.top()); n.pop(); } while(!tmp.size()) cout<<tmp.top(),tmp.pop(); }