C++ One Line O(n) Bezout's Lemma
We just need to check that GCD of all numbers is 1 (follows from Bezout\'s Lemma).\nC++\nbool isGoodArray(vector<int>& nums) {\n        return accumulate(nums.b
We just need to check that GCD of all numbers is 1 (follows from Bezout\'s Lemma).\n```C++\nbool isGoodArray(vector<int>& nums) {\n        return accumulate(nums.begin(), nums.end(), 0, [] (int a, int b) {return __gcd(a, b);}) == 1;\n}\n```
['Math', 'C']