为什么0分
题目传送门
还有帮我看看为什么RE
#include<bits/stdc++.h>
using namespace std;
stack<char>q;
string s;
int t,n;
int main()
{
int i;
cin>>n;
cin>>s;
for(i=0;i<n;++i)
{
if(s[i]=='('||s[i]=='[') q.push(s[i]);
else
{
if(q.top()=='('&&s[i]==')') t++;
if(q.top()=='['&&s[i]==']') t++;
q.pop();
}
}
cout<<t*2;
return 0;
}
