Update 1009.cpp