swap() 交换两个数
普通程序员:
void swap(int &a, int &b)
{
int temp;
temp = a;
a = b;
b = temp;
}
文艺程序员
void swap(int &a, int &b)
{
a = a^b;
b = a^b;
a = a^b;
}
2B程序员
void swap(int a, int b)
{
int temp;
temp = a;
a = b;
b = temp;
}