namespace std { template<typename T> void swap(T& a, T& b) { T temp(a); a = b; b = temp; }
복사 후 바꾸기가 핵심이다