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. 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 |
A. Unusual Competitions
猜你喜欢
转载自blog.csdn.net/chen_zan_yu_/article/details/104738623
今日推荐
周排行