Solution of TopCoder's Single Round Match 449 / Division 2