2683.cpp (182B)
1 class Solution { 2 public: 3 bool doesValidArrayExist(const vector<int> &derived) const { 4 return accumulate(begin(derived), end(derived), 0, bit_xor<int>()) == 0; 5 } 6 };