update 1009.cpp