UVA13002 Just Some Permutation 5

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=866&page=show_problem&problem=4890 [PDF](https://uva.onlinejudge.org/external/130/p13002.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13002/1f393f50adba594a63c3cc8a6e1881c6072e4e72.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13002/74f52d72e32b2e7e6dbdb45107c7786558e9fbb1.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13002/185b34a4eb50a074fca2492ae49662f75e1f88d0.png)