UVA738 A Logical Problem

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=9&page=show_problem&problem=679 [PDF](https://uva.onlinejudge.org/external/7/p738.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA738/3c68311891a50c3dee6d7024b553768cb62940b4.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA738/63f2a04c453e5eff1d3d84b30ddded530942e909.png)

Output Format

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