括号匹配中配版
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
假设表达式中允许包含两种括号:圆括号和中括号,其嵌套的顺序随意,但需要成对出现。即([])或[] ()()等为正确的格式,)([为不正确的格式。 给定一串括号输入(换行作为结束符),检测格式是否正确,若正确输出YES;错误输出NO。 (括号数量≤100)
输入描述
无
输出描述
无
样例输入 1
()[]
样例输出 1
YES
2024022204
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 10
- Start at
- 2024-2-22 17:00
- End at
- 2024-2-22 18:30
- Duration
- 1.5 hour(s)
- Host
- Partic.
- 10