UVA12903 Just Some Permutations

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=862&page=show_problem&problem=4768 [PDF](https://uva.onlinejudge.org/external/129/p12903.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12903/669292666ff599ab60671b8473d06bfce02f1f10.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12903/300bde178e02645d036400c852babdc9a14a8999.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12903/989c35dbbf022301d0d2782491cc4a75eae33370.png)