poj1007. inversion order. dp?