The solution of problem on poj