rt,下面这个是P3719的代码,提交可以AC,但是在本地不知道什么情况没有输出,请大佬解答
#include<bits/stdc++.h>
using namespace std;
int work(){
int s=0;
char c;
while(cin>>c){
if(c==')')return s;
if(c=='(')s+=work();
if(c=='a')s++;
if(c=='|')return max(s,work());
}
return s;
}
int main(){
cout<<work();
return 0;
}