Add solution for hackercup2013 qualification round