[C++] gcd of all numbers
[Small Improvement] As long as we the gcd becomes 1, we can return true.\n\nclass Solution {\npublic:\n    bool isGoodArray(vector<int>& nums) {\n        int g(
[Small Improvement] As long as we the gcd becomes 1, we can return true.\n```\nclass Solution {\npublic:\n    bool isGoodArray(vector<int>& nums) {\n        int g(nums[0]);\n        for (const int& n: nums)\n            if ((g = gcd(g, n)) == 1)\n                return true;\n        return false;\n    }\n};\n```
[]