位运算
class Solution {
public int[] singleNumbers(int[] nums) {
int n = 0, x = 0, y = 0, d = 1;
for(int num : nums) n ^= num;
d = n & -n; // 返回n的最后一位1
for(int num : nums){
if((d & num) == 0) x ^= num;
else y ^= num;
}
return new int[]{x ,y};
}
}