Given an array A of size N. Print all the numbers less than K in the array. The numbers should be such that the difference between every adjacent digit should be 1.
Note: Print '-1' if no number if valid.
Input Format
The first line consists of an integer T i.e number of test cases. T testcases follow. Each testcase contains two lines of input. The first line consists of two integers N and K separated by a space. The next line consists of N spaced integers.
Constraints
1 1 1
Output Format
For each testcase, print the required output.
Sample Input 0
1
8 54
7 98 56 43 45 23 12 8
Sample Output 0
43 45 23 12
Sample Input 1
4
6 2000
123 234 245 121 456 677
5 123
121 101 10 111 123
5 50000
246 2344 455 4545 6756
3 12345
10 1234 4321
Sample Output 1
123 234 121 456
121 101 10
4545
10 1234 4321
bolo putt good evening putt mera bugha ki karda e love you
Answers
Answered by
0
Answer:
dhdhfjruroyeieie5e3iwjsgdydoufudhtj jyogjf8tjfueyeye6stq5wgduthx7xbdhxhdgzyscztwutj ng8thx62tavzgwgshxit8tpficd5yyheydusoaysveyd8wjdtudhsfjiwowywitwwryuqyelufbxxkcnoheiwgkske is the dkskwdoyrlf9dpe68slhekgdjdphhdlddiydhdsaashgggagggyyeeoqkweydly
fjz
Explanation:
oyeeksfajrqjrwgmxbvmcbxb.dkhsky2iwoskslhdhdhchclhfjfhdysoyeoyr
Similar questions