文件名称:Huaweijishi
介绍说明--下载内容均来自于网络,请自行研究使用
四月一日快到了,Vayko想了个愚人的好办法――送礼物。嘿嘿,不要想的太好,这礼物可没那么简单,Vayko为了愚人,准备了一堆盒子,其中有一个盒子里面装了礼物。盒子里面可以再放零个或者多个盒子。假设放礼物的盒子里不再放其他盒子。
用()表示一个盒子,B表示礼物,Vayko想让你帮她算出愚人指数,即最少需要拆多少个盒子才能拿到礼物。
输入:
本题目包含多组测试,请处理到文件结束。
每组测试包含一个长度不大于1000,只包含’(‘,’) 和’B 三种字符的字符串,代表Vayko设计的礼物透视图。
你可以假设,每个透视图画的都是合法的。
输出:
对于每组测试,请在一行里面输出愚人指数。
样例输入:
((((B)()))())
(B)
样例输出:
4
1-Is coming on April 1, Vayko think a good way to fool, gifts.Hey hey, don t think too good, this gift is not so simple, Vayko to fool, prepared a pile of boxes, including a box filled with gifts.Box can put zero or more box.Assuming that put gift box is no longer put other box.
B in () a box, gifts, said Vayko want you to help her figure out the fool index, namely the least how much need to open a box to get gift.
Input:
This topic contains multiple sets of test, please process to the end of the file.
Each group test consists of a length is not more than 1000, contains only ( , ) and B three character string, representative Vayko gift design perspective.
You can assume that, each perspective drawing is legal.
Output:
For each set of test, please within a line output index of fools.
The sample input:
(((((B))))))
(B)
The sample output:
4
1
用()表示一个盒子,B表示礼物,Vayko想让你帮她算出愚人指数,即最少需要拆多少个盒子才能拿到礼物。
输入:
本题目包含多组测试,请处理到文件结束。
每组测试包含一个长度不大于1000,只包含’(‘,’) 和’B 三种字符的字符串,代表Vayko设计的礼物透视图。
你可以假设,每个透视图画的都是合法的。
输出:
对于每组测试,请在一行里面输出愚人指数。
样例输入:
((((B)()))())
(B)
样例输出:
4
1-Is coming on April 1, Vayko think a good way to fool, gifts.Hey hey, don t think too good, this gift is not so simple, Vayko to fool, prepared a pile of boxes, including a box filled with gifts.Box can put zero or more box.Assuming that put gift box is no longer put other box.
B in () a box, gifts, said Vayko want you to help her figure out the fool index, namely the least how much need to open a box to get gift.
Input:
This topic contains multiple sets of test, please process to the end of the file.
Each group test consists of a length is not more than 1000, contains only ( , ) and B three character string, representative Vayko gift design perspective.
You can assume that, each perspective drawing is legal.
Output:
For each set of test, please within a line output index of fools.
The sample input:
(((((B))))))
(B)
The sample output:
4
1
(系统自动生成,下载前可以参看下载内容)
下载文件列表
14号A卷第二题.txt