| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 118379 | 沈梓珺 | 行编辑程序 | C++ | Accepted | 100 | 0 MS | 260 KB | 310 | 2023-12-30 10:31:28 |
#include<bits/stdc++.h> using namespace std; string s; char a[50005]; int p; int main(){ getline(cin,s); int len=s.size(); for(int i=0;i<len;i++){ if(s[i]=='@') p=0; else if(s[i]=='#'&&p>0) --p; else if(s[i]!='#') a[++p]=s[i]; } for(int i=1;i<=p;i++){ cout<<a[i]; } return 0; }