UVA13272 Bracket Sequence

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=878&page=show_problem&problem=5196 [PDF](https://uva.onlinejudge.org/external/132/p13272.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13272/8419a6dbd2e31d705eb0ce55656bf57f4fbe744d.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13272/c033f185a6232aa619cc2199ec4249c5f5556672.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13272/14ab78cdea666a47b214d9e50610ec713d34f14d.png)