1 5 8 10 错了
why
#include<cmath>
using namespace std;
int n;
int x;
char c[1000];
int main(){
scanf("%d",&c+1);
int cnt=0;
int f=0;
for(int i=1;i<=n;i++){
if(c[i]=='('){
cnt++;
}
else if(c[i]==')'){
if(cnt==0){
cout<<"NO";
return 0;
}
cnt--;
}
}
if(cnt!=0)f=1;
if(f)cout<<"YES";
else cout<<"NO";
return 0;
}