[Solution] Difference of GCDs Codeforces Solution
You are given three integers , , and . You need to construct an array () such that are all distinct or report there's no solution.
Here denotes the greatest common divisor (GCD) of integers and .
The input consists of multiple test cases. The first line contains a single integer () — the number of test cases. The description of the test cases follows.
The first line contains three integers , , (, ).
It is guaranteed that the sum of over all test cases does not exceed .
For each test case, if there is no solution, print "NO" (without quotes). You can print letters in any case (upper or lower).
Difference Operations Codeforces Solution
Difference of GCDs Codeforces Solution
Doremy's IQ Codeforces Solution
Difference Array Solution Codeforces
Partial Virtual Trees Codeforces Solution
Otherwise, print "YES" (without quotes). In the next line, print integers — the array you construct.
If there are multiple solutions, you may output any.
No comments:
Post a Comment