/ GCOJ / 题库 /

[GCOI Round #1 C] Brackets

[GCOI Round #1 C] Brackets

题目描述

Mr Aoligei was playing with a string \(s\) written in the computer. The string has brackets and letters inside which he thought it was funny. He likes the string. Then, a hacker hacked his computer. The string was damaged, and he needs to find out How many pairs of brackets are in his string in order to find his string.

Note: "()" is a pair of brackets, but ")(" is not.

输入格式

Input is given from Standard Input in the following format:
\[{\large s}\]

输出格式

print the number of pairs of brackets in the string.

输入输出样例

Input #1

(o)8<))

Output #1

1

信息

ID
1006
难度
3
分类
模拟 | 数据结构 | 点击显示
标签
递交数
9
已通过
1
通过率
11%
上传者

相关

在下列比赛中:

GCOI Round #1