June 2013 Long Contest, Medium problems