My PKU Judge Online (poj.org) Solutions