topcoder algorithm implementations