UVA651 Deck

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=8&page=show_problem&problem=592 [PDF](https://uva.onlinejudge.org/external/6/p651.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA651/384ed9785bec82f715c5649dda5a966eaefdc6fd.png)

Input Format

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

Output Format

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