Responsive image

Problem 1752 --括号匹配

1752: 括号匹配

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 6  Solved: 1
[Submit][Status][Web Board][Creator:]

Description

现在,有一行括号序列,请你检查这行括号是否配对。

Input

多组输入数据,每组输入数据都是一个字符串S(S的长度小于10000,且S不是空串),数据保证S中只含有"[","]","(",")"四种字符。

Output

每组输入数据的输出占一行,如果该字符串中所含的括号是配对的,则输出Yes,如果不配对则输出No。

Sample Input

[(])
(])
([[]()])

Sample Output

No
No
Yes

Source

 

[Submit][Status]
ACM算法攻关部
  • Anything about this OnlineJudge, Please Contact Administrator. Click add QQ

    OJ system based on HUSTOJ Project , UI based on Twitter Bootstrap

    Copyright 2016 ACM算法攻关部
    关于网站改版