No sequence Codechef solutions Today | Codechef Starters 72 ✅ (100/100) FULL | AC Code ✅| NOSEQ
Problem
Alice gave Bob integers and . Help Bob find an -good sequence.
A sequence of length is called -good if the following conditions are met:
- for each
If there are multiple -good sequences, print any of them.
If no -good sequence exists, print .
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- Each test case consists of a single line of input containing three space-separated integers — and .
Output Format
For each test case:
- If no -good sequence exists, print .
- Otherwise, output space-separated integers denoting the -good sequence.
If multiple -good sequences exist, you may print any of them.
Constraints
Sample 1:
Input
Output
3 4 2 15 3 6 36 5 5 7
1 1 1 1 0 0 1 -2
Explanation:
Test case : We have and
, hence is an -good sequence.
Test case : We have and . so clearly is -good.
Test case : No -good sequence of length exists.