C++ 1 line
```\n    bool isGoodArray(vector& nums) {\n        return accumulate(nums.begin(), nums.end(), nums[0], gcd) == 1;\n    }
```\n    bool isGoodArray(vector<int>& nums) {\n        return accumulate(nums.begin(), nums.end(), nums[0], gcd<int,int>) == 1;\n    }
[]