| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 141687 | 秦炜杰 | 行编辑程序 | C++ | Wrong Answer | 92 | 0 MS | 256 KB | 416 | 2024-04-06 09:59:16 |
#include<bits/stdc++.h> using namespace std; int main(){ string s; stack<char> st,stt; getline(cin,s); for(int i=0;i<s.size();i++){ if(s[i]=='#'&&st.size()) st.pop(); else if(s[i]=='@'&&st.size()){ while(!st.empty()) st.pop(); } else st.push(s[i]); } while(!st.empty()){ stt.push(st.top()); st.pop(); } while(!stt.empty()){ cout<<stt.top(); stt.pop(); } return 0; }