practicing brute force topcoder problems