[Solution] Difference Operations Codeforces Solution
You are given an array consisting of positive integers.
You are allowed to perform this operation any number of times (possibly, zero):
- choose an index (), and change to .
Is it possible to make for all ?
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 one integer () — the length of array .
The second line contains integers ().
For each test case, print "YES" (without quotes), if it is possible to change to for all , and "NO" (without quotes) otherwise.
Difference Operations Codeforces Solution
Difference of GCDs Codeforces Solution
Doremy's IQ Codeforces Solution
Difference Array Solution Codeforces
Partial Virtual Trees Codeforces Solution
You can print letters in any case (upper or lower).
No comments:
Post a Comment