http://poj.org/problem?id=2914
Merge branch 'master' of https://github.com/ototsuyume/poj-solution