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