Code for practising previous Topcoder SRM's