UVA11129 An antiarithmetic permutation

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=23&page=show_problem&problem=2070 [PDF](https://uva.onlinejudge.org/external/111/p11129.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11129/474789de8da4ca81419f5ff96c721388b47fef2d.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11129/5807041cff2ef26534dc7a69f7c0c6cd87b299d3.png)