
1회차: 24/07/02 20:00 ~ 23:00
장소: ZOOM
계획: 24년 하계 모각코
스터디 주제 : 스택 자료구조를 통해 괄호 짝 맞추기 문제 해결
https://www.acmicpc.net/problem/9012
스터디 목표 : 백준 알고리즘 문제를 미리 선정하여 해결하기

T = int(input())
for i in range(T):
stack = []
a=input()
for j in a:
if j == '(':
stack.append(j)
elif j == ')':
if stack:
stack.pop()
else:
print("NO")
break
else:
if not stack:
print("YES")
else:
print("NO")
