UVA11071 Permutation Representation

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=22&page=show_problem&problem=2012 [PDF](https://uva.onlinejudge.org/external/110/p11071.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11071/10f7185c642234077b25adaceaf9f6f638fe07af.png)

Input Format

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

Output Format

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