UVA582 Randomly Wired Neural Nets

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=7&page=show_problem&problem=523 [PDF](https://uva.onlinejudge.org/external/5/p582.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA582/fb7a99e51c337647efab91e4abef54d65d115c6a.png)

Input Format

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

Output Format

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