added solution for flea problem from topcoder