UVA13088 Lexicographically Smallest FPIS

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=866&page=show_problem&problem=4986 [PDF](https://uva.onlinejudge.org/external/130/p13088.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13088/9e2358437385a8e6281d5290b82479905118560a.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13088/548c252a89230d3b5864926e50591c009446654e.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13088/275b03ec04dc871fd92db80dcb807baaf12c0ed2.png)