UVA11023 Multisets and Sequences

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=22&page=show_problem&problem=1964 [PDF](https://uva.onlinejudge.org/external/110/p11023.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11023/0a71b5e6f8f7733a423c1c039d39b1dd015dd065.png)

Input Format

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

Output Format

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