MINUS  Minus Operation
There are n integer numbers listed in one line. Every time you can arbitrarily choose two neighboring integers, kick them out and write down the result of the first number subtract the second number instead. Now, you want to get number m after you perform this operation n1 times.
Input
Multiple test cases, the number of them is given in the very first line.
For each test case:
The first line contains two spaceseparated integers n(1<= n <=100) and m(500<= m <=500). n lines follow, each contains a single integer (in the range [0,100]) denotes the original numbers.
Output
For each test case:
You should output n1 lines, each contains a single integer p_{i}, which denotes that you are to wipe the p_{i}th and (p_{i}+1)th number in the current sequence and use their substraction instead. Each line of your output should not have any leading or trailing white spaces.
You may assume that there is always a valid solution to each test case in the input file. If there are multiple solutions, any of them will be accepted.
Print a blank line after each test case.
Example
Input:
1
5 4
12
10
4
3
5
Output:
2
3
2
1
hide comments
singhsauravsk:
20170416 07:10:11
Awesom problem to get concept cleared in Dynamic Programming. Last edit: 20170604 23:58:13 

ashish22_dwd:
20160912 21:18:47
Nice problem.. learnt a lot 

Pagan Min:
20150524 15:05:22
nice question on knapsack...worth solving 

rafael859:
20140929 21:48:53
Don't forget the blank line! It caused me way too many WAs! (Or problemsetter could try to write a better judge...) 

maniAC:
20140904 20:46:50
Nice problem. 

:
20140717 11:14:36
in 2 numbers chosen is the subtraction always have to be a[i1]a[i]?


Suriya Narayanan:
20140629 15:14:52
easy DP.. solved \m/ 

:D:
20120619 06:18:38
Series of operations you perform and resulting sequences:


conio:
20120618 09:28:51
i cant understand problem itself..can anyone expalin plz..

Added by:  Fudan University Problem Setters 
Date:  20071103 
Time limit:  10s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 C99 ERL JSRHINO OBJC SQLITE 
Resource:  description by Blue Mary; standard program and test data by Zhou Yisu 