SP19274 BLOPER - Operators

题目描述

给定一组N个整数A={1,2,3,…,N}和一个整数S,你的任务是找到一种方法,在A的每相邻两个数中插入运算符“+”或“-”,插入后的表达式结果等于S。

输入格式

A single line, N and S (1

输出格式

If there are way(s) to insert, outputs any of them, otherwise outputs “Impossible” (without quotes).