【数据结构】Tournament Chart
Tournament Chart 题目描述 In 21XX, an annual programming contest, Japan Algorithmist GrandPrix (JAG) has become one of the most popular mind sports events. JAG is conducted as a knockout tournament. This year, N contestants will compete in JAG. A tournament chart is represented as a string. '[[a-b]-[c-d]]' is an easy example. In this case, there are 4 contestants named a, b, c, and d, and all matches are described as follows: Match 1 is the match between a and b. Match 2 is the match between c and d. Match 3 is the match between [the winner of match 1] and [the winner of match 2]. More precisely,