| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 118389 | 唐钧 | 行编辑程序 | C++ | Wrong Answer | 7 | 0 MS | 248 KB | 420 | 2023-12-30 10:40:06 |
#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<<char(q.top()); q.pop(); } return 0; }