Codes snippet of topcoder problems in c++ and java.