#Â. 表达式括号匹配

    Type: Default 1000ms 128MiB

表达式括号匹配

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.

题目描述

假设一个表达式有英文字母(小写)、运算符(+,,,/+,—,*,/)和左右小(圆)括号构成,以“@@”作为表达式的结束符。请编写一个程序检查表达式中的左右圆括号是否匹配,若匹配,则返回“YESYES”;否则返回“NONO”。表达式长度小于255255,左圆括号少于2020个。注意的是这里只用匹配括号数量即可!

输入格式

一行数据,即表达式。

输出格式

一行,即“YES”或“NO”。

样例1

2*(x+y)/(1-x)@
YES 

样例2


(25+x)*(a*(a+b+b)@
NO 

第七届SWPU-ACM老生预选赛

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
187
Start at
2022-9-19 14:00
End at
2022-10-28 14:00
Duration
936 hour(s)
Host
Partic.
45