UVA13234 Fantastic Sorting Algorithm

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=878&page=show_problem&problem=5157 [PDF](https://uva.onlinejudge.org/external/132/p13234.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13234/12f8cc3daa59559ab24cfb3aad91706c2ff6c27f.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13234/902542e525881d2e91f05a56dda83cfd10ffc7e6.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13234/663c44708e543fcbbdce41d951fa2d84aaf44991.png)