Copy past solution, wanted to test Topcoder's Applet and editors for C++