BLOPER  Operators
Given a set of N integer A = {1, 2, 3, …, N} and a integer S, your task is find a way to insert an operator ‘+’ or ‘‘ to every neighbor pair of A, that the result of the expression after insert equal to S.
Input
A single line, N and S (1 ≤ N ≤ 500, S ≤ 125250)
Output
If there are way(s) to insert, outputs any of them, otherwise outputs “Impossible” (without quotes).
Example
Input: 9 5 Output: 12+34+56+78+9
Input: 5 6 Output: Impossible
hide comments
jonathanzong:
20170906 22:52:49
Can anyone help me? only possible solution i thought of is dynamic programming 

blaskwolf:
20170719 19:06:10
for case 25 check something like 7 0 or 3 0


poorya:
20170630 21:38:30
i don't know why wrong answer on case upper than 20


root_rohit:
20170406 15:33:34
How do I know on which test case my code failed? 

heptathlon123:
20161127 10:30:03
what is 5 and 6? 

haitran204:
20161021 16:30:58
Last edit: 20161021 16:43:58 

master_milind:
20161016 00:51:15
fails at case 25


sheep94lion:
20160916 05:01:25
I really cann't think of a better way than dfs, can anybody help me or tell me some places where I can find some ideas. : ( 

rainy jain :
20160528 06:08:21
Last edit: 20160909 10:46:09 

xpshekhar:
20160331 05:14:28
You can't put '  ' before 1.Hope this helps.

Added by:  Kata 
Date:  20140328 
Time limit:  0.100s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 