80RE,源代码上调,悬赏关注
查看原帖
80RE,源代码上调,悬赏关注
1286671
earyyds楼主2024/9/5 19:48
#include<bits/stdc++.h>
#define ll long long
#define pritnf printf
#define rpintf printf
#define do double
using namespace std;
vector<string> a;string qwq;ll n,ans;
int main(void){
    scanf("%lld",&n);
    ans = n;
    for(int i = 0;i < n;i++){
    	cin >> qwq;
    	if(qwq != "<bs>") 
		    a.push_back(qwq);
		else{
		    a.pop_back();
		    ----ans;
		}
	}
	for(int i = 0;i < ans;i++){
		cout << a[i];
	}
	return 0;
}
2024/9/5 19:48
加载中...