UVA10252 Common Permutation

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=14&page=show_problem&problem=1193 [PDF](https://uva.onlinejudge.org/external/102/p10252.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10252/e62f4bcf919fc284ba1e5eaaf1b5ce8a57872a3b.png)

Input Format

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

Output Format

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