UVA13238 Just More Permutations

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=878&page=show_problem&problem=5161 [PDF](https://uva.onlinejudge.org/external/132/p13238.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13238/41a6e2443dc0993367e881cec37a0affd8b43496.png)

Input Format

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

Output Format

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