POJ 1390. Blocks

某岛 at 
… http://poj.org/problem?id=1390……