| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 141770 | 罗嘉为 | 行编辑程序 | C++ | Compile Error | 0 | 0 MS | 0 KB | 400 | 2024-04-06 10:57:08 |
#include <bits/stdc++.h> using namespace std; char a[110000]; int ans = 0; bool empty(){ return ans == 0; } void push(char t){ s[ans++] = t; } void pop(){ if(!empty()) ans--; } void pop1(){ ans = 0; } int main(){ char t; while(cin >> t){ if(t == '#') pop(); else if(t == '@') pop1(); else push(t); } for(int i = 0; i < tot; i++) cout << s[i]; return 0; }