Anti-knapsack CodeChef Solution | CodeChef Problem Solution 2022
You are given two integers and .
Construct an array consisting of distinct positive integers such that the following conditions are met:
- There exists no subsequence of with sum .
Solution Click Below:- CLICK HERE
It can be shown that the answer always exists.
Input Format
- The first line contains a single integer : the number of test cases.
- The only line of each test case contains two integers and - as mentioned in the statement.
Output Format
For each test case, print a single line containing space-separated elements: . If there are multiple answers, you may print any.
Constraints
Join Now for Solution:-
No comments:
Post a Comment