1. !=可以连续不等于
即a!=b!=c!=d
2.在#include<vector>中
unique可以去除相邻的重复元素
所以为了去除vector中的重复元素 先进行sort排序(#include<algorithm>)
vector<int>a;
sort(a.begin(),a.end());
vector<int>::iterator it=unique(a.begin(),a.end());
a.erase(it,a.end());
3.可以用set判断有无重复元素
具体通过判断长度是否相同
4.数组中
for (int num : nums)的作用就相当于把数组中的数都遍历一遍
5.异或运算符(二进制)
例子:1^1=0 1^0=1
两元素相同异或为0
任何数A异或0为A