Sumsets

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1066 [PDF](https://uva.onlinejudge.org/external/101/p10125.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10125/29d92f1d32bdaefa1d311d7a2aa7e97895e4a322.png)

输入输出格式

输入格式


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

输出格式


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

输入输出样例

输入样例 #1

5
2
3
5
7
12
5
2
16
64
256
1024
0

输出样例 #1

12
no solution