Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
141633 黄戈 行编辑程序 C++ 运行出错 92 0 MS 260 KB 454 2024-04-06 09:14:30

Tests(13/14):


#include<bits/stdc++.h> using namespace std; stack<char> st; char a1[114514]; int cnt; int main(){ string a; getline(cin,a); int len=a.length(); for(int i=0;i<len;i++){ if(a[i]=='#'){ st.pop(); } else if(a[i]=='@'){ while(!st.empty()){ st.pop(); } } else{ st.push(a[i]); } } while(!st.empty()){ a1[cnt++]=st.top(); st.pop(); } for(int i=cnt-1;i>=0;i--){ cout<<a1[i]; } return 0; }


测评信息: