###对滴,数据太水!
![](https://cdn.luogu.com.cn/upload/pic/3624.png)
本想骗个七八十分玩玩,没想到……
AC!
![](https://cdn.luogu.com.cn/upload/pic/3625.png)
骗分程序:
```cpp
var s:string;
i,left,right:longint;
begin
readln(s);
for i:=1 to length(s) do
begin
if s[i]='(' then inc(left);
if s[i]=')' then inc(right);
end;
if left=right then writeln('YES') else writeln('NO');
end.
```
by KonnyakuZeri @ 2016-12-06 16:45:13
楼上的头像。。。醉了
by bcku1 @ 2016-12-06 20:31:53
。。。
by McGrady @ 2016-12-22 23:49:16
关键是没有这样的测试数据……
)))+6+(((
by Sooke @ 2016-12-28 20:23:10
@[Sooke](/space/show?uid=26673) 哎呀你是对的
by XiaoDiandong @ 2017-03-06 18:35:42
```cpp
var
a:array[1..20000] of char;
i,x,len:integer;
s:string;
begin
read(s);
len:=length(s);
for i:=1 to len do a[i]:=s[i];
for i:=1 to len do
begin
if a[i]='(' then inc(x);
if a[i]=')' then dec(x);
end;
if x=0 then write('YES') else write('NO');
end.
```
by ttbr5145 @ 2017-07-18 22:21:58
```cpp
var
i,x:integer;
s:string;
begin
read(s);
for i:=1 to length(s) do
begin
if s[i]='(' then inc(x);
if s[i]=')' then dec(x);
end;
if x=0 then write('YES') else write('NO');
end.
```
by ttbr5145 @ 2017-07-18 22:23:26
第二个是优化后的
by ttbr5145 @ 2017-07-18 22:23:57