Topcoder SRM 594