A. Unusual Competitions

滴答滴答---题目链接 

A. Unusual Competitions

time limit per test

1 second

memory limit per test

512 megabytes

input

standard input

output

standard output

A bracketed sequence is called correct (regular) if by inserting "+" and "1" you can get a well-formed mathematical expression from it. For example, sequences "(())()", "()" and "(()(()))" are correct, while ")(", "(()" and "(()))(" are not.

扫描二维码关注公众号,回复: 10229194 查看本文章

The teacher gave Dmitry's class a very strange task — she asked every student to come up with a sequence of arbitrary length, consisting only of opening and closing brackets. After that all the students took turns naming the sequences they had invented. When Dima's

猜你喜欢

转载自blog.csdn.net/chen_zan_yu_/article/details/104738623
今日推荐