Topcoder SRM 523