UVA12908 The book thief

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=862&page=show_problem&problem=4773 [PDF](https://uva.onlinejudge.org/external/129/p12908.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12908/3bca5800b575a6bcfa905e8608f7f4524badb401.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12908/3afd1466fac8cae62411941dcd4dc2cc435c34a3.png)