BST InvariantSets from Topcoder SRM 628