Feedback | If you notice incorrect translations in Contester, please let author know.
|
|
Time limit 3000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Автор: Фёдор Меньшиков, ВГПУ.
Difficulty Beta
Given N integers, X1, X2, X3... XN, evaluate an expression by putting '+' or '-' signs, which is equal to a sum S.
Input
The first line contains the integers N ( N ≤ 24) and S (-1000000000 ≤ S ≤ 1 billion) . The second line contains N, integers Xi ( 0 ≤ Xi ≤ 50 million).
Output
Print out the solution, or in its absence output "No Solution".
Test 1
|
Test 2
|
3 10
15 25 30
|
2 100
10 10
|
Вывод 1
|
Вывод 2
|
15 + 25 - 30 = 10
|
No solution
|
Для отправки решений необходимо выполнить вход.
|