| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 141611 | 刘嘉柚 | 行编辑程序 | C++ | Accepted | 100 | 0 MS | 256 KB | 409 | 2024-04-06 09:00:53 |
#include<iostream> #include<cstdio> using namespace std; const int N=1e5+005; int siz; char s[N]; bool empty(){ return siz==0; } void push(char ch){ s[siz++]=ch; } void poper(){ if(!empty()) siz--; } void popest(){ siz=0; } int main(){ char c; while(cin>>c){ if(c=='#') poper(); else if(c=='@') popest(); else push(c); } for(int i=0;i<siz;i++) cout<<s[i]; return 0; }