救命! 帅哥美女们 求救!回复必关!
查看原帖
救命! 帅哥美女们 求救!回复必关!
1637519
tuomiao楼主2025/1/23 15:13
#include <bits/stdc++.h>
using namespace std;
stack<char> c;char s[260];
int main(){
	cin>>s;
	for(int i=0;s[i]!='@';i++)
		if(s[i]=='(') c.push(s[i]);
		else if(s[i]==')')
			if(c.empty()) c.push(s[i]);
			else c.pop();
	std::cout<<(c.empty()?"YES":"NO");
	return 0;
}

90分求救!!!回复就关!来者不拒!!!

2025/1/23 15:13
加载中...