C++ Code for Meccy 2014