| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 118386 | 唐钧 | 行编辑程序 | C++ | Wrong Answer | 7 | 0 MS | 252 KB | 417 | 2023-12-30 10:37:54 |
#include<bits/stdc++.h> using namespace std; stack<char>q; int main() { string s; getline(cin,s); int len=s.size(); for(int i=0;i<len;i++) { if(s[i]!='#'&&s[i]!='@') { q.push(s[i]); } else if(s[i]=='#') { q.pop(); } else if(s[i]=='@') { while(!q.empty()) { q.pop(); } } } while(!q.empty()) { cout<<q.top(); q.pop(); } return 0; }