求大佬看看
#include<bits/stdc++.h>
using namespace std;
int main()
{
stack<int>s;
string a;
while(1)
{
cin>>a;
if(a=="(")
{
s.push(1);
}
else if(a==")" && !s.empty())
{
s.pop();
}
else if(a=="@")
{
break;
}
}
if(s.empty())
{
cout<<"YES";
}
else
{
cout<<"NO";
}
return 0;
}