Update cp.cpp