UVA11532 Simple Adjacency Maximization

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=27&page=show_problem&problem=2527 [PDF](https://uva.onlinejudge.org/external/115/p11532.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11532/85adf103bc42ea232700cafa3233f87b4b044924.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11532/8863040ba9e739221494706ff3ea6ff69548824a.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11532/64b420b07f33f054985204bbce431ebc01ae9ce2.png)