| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 141615 | 谢思涵 | 行编辑程序 | C++ | Wrong Answer | 92 | 0 MS | 260 KB | 456 | 2024-04-06 09:03:37 |
#include <iostream> #include <cstring> using namespace std; char a[10001000]; int main() { string s; getline(cin, s); int len = s.size(), cur = 0; for(int i = 0; i < len; i++) { if(s[i] == '@') { for(int i = 1; i <= cur; i++) a[i] = ' '; cur = 0; } else if(s[i] == '#') { if(cur > 1) a[cur--] = ' '; } else a[++cur] = s[i]; } for(int i = 1; i <= cur; i++) cout << a[i]; cout << endl; return 0; }