提交时间:2024-04-06 09:11:33

运行 ID: 141625

#include <bits/stdc++.h> using namespace std; main() { int now = 0, tot2 = 0; string ans; char t; while (cin >> t) { now++; if (t == '#') now--; else if (t == '@') now = ans.find(' ', tot2), tot2 = now + 1; else ans += t; } for (int i = 0; i < now; i++) cout << ans[i]; }