#include <iostream>
void swap(int &a, int &b)
{
int tmp = a;
a = b;
b = tmp;
}
int main()
{
int a = 10;
int b = 20;
std::cout<< "[a, b]: ["<< a<< ", "<< b<< "]\n";
swap(a, b);
std::cout<< "[a, b]: ["<< a<< ", "<< b<< "]\n";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdm9pZCBzd2FwKGludCAmYSwgaW50ICZiKQp7CiAgICBpbnQgdG1wID0gYTsKICAgIGEgPSBiOwogICAgYiA9IHRtcDsKfQoKaW50IG1haW4oKQp7CglpbnQgYSA9IDEwOwoJaW50IGIgPSAyMDsKCQoJc3RkOjpjb3V0PDwgIlthLCBiXTogWyI8PCBhPDwgIiwgIjw8IGI8PCAiXVxuIjsKCQoJc3dhcChhLCBiKTsKCQoJc3RkOjpjb3V0PDwgIlthLCBiXTogWyI8PCBhPDwgIiwgIjw8IGI8PCAiXVxuIjsKCXJldHVybiAwOwp9