1 solutions
-
1
超级简单
#include <bits/stdc++.h> using namespace std; int top; char ch[105]; string a; int main() { getline(cin,a); for(int i = 0;i<a.length();i++){ if(a[i] == '@')top = 0; else if(a[i] == '#'){ if(top>0)top--; } else{ top++; ch[top] = a[i]; } } for(int i = 1;i<=top;i++)cout<<ch[i]; return 0; }
- 1
Information
- ID
- 633
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 9
- Tags
- (None)
- # Submissions
- 13
- Accepted
- 4
- Uploaded By