C++ 3 lines
\nbool isGoodArray(vector<int>& nums) {\n    auto gcd = nums[0];\n    for (auto n : nums) gcd = __gcd(gcd, n);\n    return gcd == 1;\n}\n
```\nbool isGoodArray(vector<int>& nums) {\n    auto gcd = nums[0];\n    for (auto n : nums) gcd = __gcd(gcd, n);\n    return gcd == 1;\n}\n```
[]