蒟蒻70--->3WA求助!!!
查看原帖
蒟蒻70--->3WA求助!!!
825033
封禁用户楼主2023/11/2 21:32
#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    int t=0;
    cin>>s;
    for(int i=0;i<s.size();i++){
        if(s[i]=='(')t++;
        if(s[i]==')')t--;
    }
    cout<<(!t?"YES":"NO");
    return 0;
}
2023/11/2 21:32
加载中...