SRM 590. div1-250. Submitted for 102 points.