80pts 求调 悬赏关注
查看原帖
80pts 求调 悬赏关注
971396
The_Seal_楼主2024/10/7 12:27

rt

这里是评测记录

#include<bits/stdc++.h>
using namespace std;
char c[105];
string s;
int main()
{
	int n,x;
	int top=0;
	cin>>n;
	x=n;
	while(x--)
	{
		cin>>s;
		if(s[0]=='<'&&top)
			top--;
		else c[top++]=s[0];
	}
	for(int i=0;i<top;i++)
	{
		cout<<c[i];
	}
	return 0;
}

2024/10/7 12:27
加载中...