BST ShoppingSurveyDiv2 TopCoder SRM 634.