UVA174 Strategy

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_problem&problem=110 [PDF](https://uva.onlinejudge.org/external/1/p174.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA174/c2e96b3107b2a2d7e4682a39a004f31a4c1db846.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA174/43f678b863852f1603252e6c257ec459c7ad11af.png)