UVA10594 Data Flow

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=17&page=show_problem&problem=1535 [PDF](https://uva.onlinejudge.org/external/105/p10594.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10594/c871fa3145996e0e65c56a7ab66d5c76c2f023f1.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10594/794677c69e7265a629d25711297962d9e2ec8664.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10594/6e17da18a86a6af4d3b1068f8ec45a6610473501.png)