南阳理工2解题报告(括号配对问题)

简单的过了头,因为没有空串

顺便说一下,自己写栈的话会快一点点,不过没必要

time 24ms memory 240

#include
#include
#include
using namespace std;

const int maxn=10000+100;
char info[maxn];

int main()
{
    int T;
    scanf("%d",&T);
    while(T--)
    {
        stack s;
        scanf("%s",info);
        for(int i=0;i


你可能感兴趣的:(解题报告)