Update solution.cpp