poj3254, state compression dp