UVA12721 Cheap B-Subsequence

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=823&page=show_problem&problem=4573 [PDF](https://uva.onlinejudge.org/external/127/p12721.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12721/e9e4f546786ea27307ff3cfa5f379594a23d657f.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12721/2b7207b661a0b248e1115ebb1112b5ee7fc60e3d.png)