-->
当前位置:首页 > 题库

PROGRAMMING:parenthesis matching

Luz5年前 (2021-05-10)题库443
Given a string containing only six kinds of brackets "()] {}", please judge whether the matching of brackets in the string is legal, that is, the number and nesting order of the corresponding brackets are completely correct.
###Input format:
An integer t in the first line (T < = 10)
After t line, a string in each line only contains six characters [{()}] (string length is less than 2e5)
###Output format:
For each string, match output yes, otherwise output No
###Input example:
```in
two
{()[]}
([)]
```
###Output example:
```out
Yes
No
```







answer:If there is no answer, please comment