Submit 1003.cpp and 1004.cpp