UVA12480 Just Some Permutations

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=279&page=show_problem&problem=3924 [PDF](https://uva.onlinejudge.org/external/124/p12480.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12480/6bf2e1b058a553208fc95af92b2f0cc02dff3efc.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12480/94a2d05ed7f4b83e40023749b43fa8968d93b4f8.png)