UVA12984 Pick The Sticks

Description

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

Input Format

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

Output Format

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