80pts悬关求助
查看原帖
80pts悬关求助
1333723
kervinyan楼主2024/10/13 15:29
#include<bits/stdc++.h>
using namespace std;
char f[105];
string u;
int main()
{
	int c,k;
	int top=0;
	cin>>c;
	k=c;
	while(k--)
	{
		cin>>u;
		if(u[0]=='<'&&top)
			top--;
		else f[++top]=u[0];
	}
	for(int i=1;i<=top;i++)
	{
		cout<<f[i];
	}
	return 0;
}
2024/10/13 15:29
加载中...