Solution for 250 points problem