class Solution {
public:
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
*
* @param array int整型vector
* @return int整型vector
*/
vector<int> FindNumsAppearOnce(vector<int>& array) {
// write code here
vector<int> res(2);
int r=0;
for(int x:array){
r^=x;
}
int m=1;
while(!(m&r))m<<=1;
for(int x:array){
if(m&x)res[0]^=x;
else res[1]^=x;
}
if(res[0]>res[1])swap(res[0],res[1]);
return res;
}
};