[백준]9012번 문제
스택 괄호문제!! #include#includeusing namespace std; int main() { char stack[51]; string str; int empty = 0; int n; int top = -1; cin >> n; for (int i = 1; i > str; for (int i = 0; i < (int)str.length(); i++) { if (str.at(i) == '(')stack[++top]= str.at(i); else { if (top == -1) { empty = 1; } else stack[top--]; } } if (top == -1 && empty == 0)cout