| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 141627 | 刘嘉乐 | 行编辑程序 | C++ | Wrong Answer | 0 | 0 MS | 264 KB | 442 | 2024-04-06 09:12:43 |
#include<bits/stdc++.h> using namespace std; stack<char> ste; char a[10000005]; int main(){ string s; getline(cin,s); for(int i=0;i<s.size();i++){ if(s[i]!='#'||s[i]!='@')ste.push(s[i]); else if(s[i]=='#'){ ste.pop(); }else{ while(!ste.empty())ste.pop(); } } int n = ste.size(); for(int i=0,j=n;i<n;i++,j--){ a[j] = ste.top(); ste.pop(); } for(int i=1;i<=n;i++){ cout<<a[i]; } return 0; }