스택 직접 만들어서
#include<string>
#include <iostream>
#include<stack>
using namespace std;
bool solution(string s)
{
bool answer = true;
stack<char> st;
for(auto e:s){
if(e=='('){
st.push('(');
}
else{
if(st.empty()){
return false;
}
st.pop();
}
}
if(!st.empty()){
return false;
}
return answer;
}