hackercup2014 qual prob1