完善longestWay